[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Pan-devel] Ya know Pan2 is really single threaded, right?
From: |
Darren Albers |
Subject: |
Re: [Pan-devel] Ya know Pan2 is really single threaded, right? |
Date: |
Sun, 18 Mar 2007 10:38:34 -0400 |
User-agent: |
Thunderbird 1.5.0.10 (X11/20070307) |
Calin A. Culianu wrote:
>
> Why does pan2 ever create a threadpool? It's actually single-threaded!
>
> I discovered this because UUDecoding attachements led to pan2 stalling
> completely (the UI was frozen too -- the whole app was stuck inside
> UUDecodeFile()). This is because pan2 does all its task processing
> from the main thread's idle loop!
>
> The other 4 threads that are created are only briefly used to create a
> socket connection to the nntp server, then the actual handshaking and
> logging-in is handled from the main thread's idle loop!
>
> Furthermore, any and all nntp stuff happens in the main thread. Sure,
> there are 4 task contexts that keep getting shuffled around, but
> basically only 1 task at a time ever runs, and it runs in the main
> thread.
>
> Meanwhile, you have this perfectly lovely thread pool sitting there
> twiddling its thumbs.
>
> Is this intentional?
>
> I think I know how to fix this.
>
> Are you guys open to accepting patches?
>
> My gripe with this for the most part is that UUDecode() of large
> binaries (sometimes a single attachment can be 50mb) stalls the whole
> app and leads to poor network utilization overall.
>
> -Calin
>
>
>
>From my experience Charles is always happy to review and accept patches
from anyone!