slow gtk.label drawing
- From: Pavol KlaÄanskà <pavol klacansky com>
- To: gtk-app-devel-list gnome org
- Subject: slow gtk.label drawing
- Date: Mon, 25 Jul 2011 16:50:09 +0200
Hi, I have written simple rss reader and I tested it with 10k items in feed.
Xml and parsing takes while (in second.) but drawing takes minutes
Part taking care of drawing
public void set_details(Feed feed, Client client) {
title.set_markup("<b>" + feed.title + "</b>");
icon.set_from_file(feed.icon);
foreach (Item cur_item in feed.items) {
if (cur_item.read == "0") {
var item_box = new Gtk.EventBox();
item_box.button_press_event.connect((event) => {
/* open in default browser */
AppInfo.launch_default_for_uri(cur_item.link, null);
/* mark item as read */
client.mark_item_read(cur_item.id);
/* destroy widget with this item */
item_box.destroy();
return true;
});
var item_buf = new Gtk.Label(cur_item.title);
item_box.add(item_buf);
text_box.pack_start(item_box, false, false);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]