Re: [gtk-list] Re: Making gtk thread-safe




> Here's an example of somthing I'm doing that I'd like to use threads for:
> In my e-mail client, I have to fill a long list of e-mail messages,
> sometime 200-400 messages in a list.  This takes about 6-10 seconds on my
> Pentium.  I would really like to launch a thread to fill the list and run
> a status bar, and meanwhile the window kept itself re-painted and
> menus/sections responded when clicked (and I want to eat my cake too!!!).

Not that it is really relevant to the subject at hand, but you
can probably speed up the process a lot by making a GList out of
your items, then using gtk_list_append_items to add them all at once.

Otherwise, you're spending most of the time doing useless geometry
negotation. Maybe you're already doing this ... When I wrote a little
ftp client in PerlGTK, I thought I needed to do incremental filling of
directory lists, until I realized that I could make the performance
quite satisfactory just by not adding each item separately.

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]