I'm going to take a wild guess here: POE::Component::Pluggable.

In looking at twister.news.nntp.py, it's a straigh nntp implementation, with a bunch of hook points.

PoCo::Client::NNTP is built on top of POE::Component::Pluggable, and so does all dispatching via a context-less layer (i.e., PoCo::Pluggable doesn't know anything about NNTP or what have you), so dispatching works in a somewhat inefficient way.

I suppose one could make it faster by inlining the dispatch code in PoCo::Plubble or something like that, though.

--d

howard chen wrote:
I have 2 simple scripts which connect to NNTP server to fetch 100
articles (no writing to local disk) in order to test the performance
of two frameworks.

I have found Twisted is faster by at least 2 times which make me surprised.

I know it is not fair to compare two frameworks by this simple test.
But I think 2 times is quite much.

Therefore, I upload the code online to see if any experts can find any problem?


Thanks.

http://howachen.googlepages.com/nntp.py
http://howachen.googlepages.com/nntp.pl


time python nntp.py news.microsoft.com microsoft.public.access access.mbox

18 sec

time perl nntp.pl

37 sec


Any comments?


Reply via email to