El mié, 09-07-2008 a las 16:02 -0700, Mitko Haralanov escribió: > On Tue, 08 Jul 2008 19:57:23 -0400 > Felipe Reyes <[EMAIL PROTECTED]> wrote: > > > I added a test case that shows (at least on my system) my trouble. > > > > somebody can give me a clue? > > The issue is locking. Changing the code to this seems to have solved > the problem: > > class FillListStore(threading.Thread): > def run(self): > gtk.gdk.threads_enter () > model.clear() > for i in range(600): > a = random.randint(0, len(img)-1) > model.append > ([gtk.gdk.pixbuf_new_from_file_at_size(rootdir + img[a], 64, 64), > str (i)]) > gtk.gdk.threads_leave () > > thread = FillListStore() > thread.start() > win.show_all() > gtk.gdk.threads_enter () > gtk.main() > gtk.gdk.threads_leave () > Yes, with the locks everything works fine, but the locks added some overhead (about 10 secons when loading 2500 pictures), I suppose that this is normal, right?
regards, -- Felipe Reyes Astorga counter.li.org #316380
signature.asc
Description: Esta parte del mensaje está firmada digitalmente
_______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/