- 论坛徽章:
- 1
|
用iTreads技术写的WebServer好吃内存
http://www.perldoc.com/perl5.8.0/pod/perlthrtut.html
看看吧...
Performance considerations
The main thing to bear in mind when comparing ithreads to other threading models is the fact that for each new thread created, a complete copy of all the variables and data of the parent thread has to be taken. Thus thread creation can be quite expensive, both in terms of memory usage and time spent in creation. The ideal way to reduce these costs is to have a relatively short number of long-lived threads, all created fairly early on - before the base thread has accumulated too much data. Of course, this may not always be possible, so compromises have to be made. However, after a thread has been created, its performance and extra memory usage should be little different than ordinary code.
我沒用過這個module...不過你的問題應該跟他說的一樣才對.. |
|