Oops, sorry...just correcting...I was talking about using large scale of 
event_pair structs intead of event-bases.
Raine




________________________________
From: Raine Fan <raine...@ymail.com>
To: Libevent-users@monkey.org
Sent: Saturday, May 2, 2009 12:46:51 AM
Subject: [Libevent-users] About libevent-2.0 documentation


Hi Nick/Niels/Libevent staff!

Meanwhiloe reading the great documentation of Libevent-2.0 
(http://wangafu.net/%7Enickm/libevent-book/) I was a bit confused on some 
warnings. Could explain in more details, if possible?

http://wangafu.net/%7Enickm/libevent-book/Ref4_event.html on 'Stack- and 
struct-allocated events'

When you say that "You shouldn’t do this unless you knowthat you’re incurring an
actual performance penalty for heap-allocating your events" instead of 
allocating them on the stack, what would be the best way to do it? If I want to 
scale my app on, lets say 1Millon fd's :-) , do you think that using heap-based 
allocation could incur in a great performance penalty? Since I'm really new to 
this kind of programing paradigm (BTW this doc is awesome!), what kind of good 
tricks/advises could you dispose to us, noobies, for making a good use of 
libevent  to scale our apps to above the C10K paradigm? If we are using 
multithreaded event-loops, using heap-allocation maybe is the only way to pass 
info between the threads, or just making a large global statically allcoated 
array of event-bases and let the threads work consistently on them?

Thanks again for the help and support!

Regards,
Raine


      
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users

Reply via email to