There where talk about disadvantage of using Fibers because it has huge 
stack and consumes more memory.

I wanted to know exactly how much more memory it consumes and created 
simple test - it creates 8000 callbacks & 8000 fibers and you can measure 
how much memory each version consumes.

8000 Callbacks - 13 MB
8000 Fibers - 90 MB

1. Seems like huge difference? I don't think so. In most web projects 
(practically all classical web apps, like express.js etc.) you don't deal 
with huge amount of requests, maybe couple tens or hundreds per second. 

3. Even in 10k apps - node can serve maybe 1-4000 on one machine, so, the 
difference would be much less, something around 12Mb vs. 40Mb.

3. It's an empty sample, in most cases you use some data inside it - it 
takes memory - and the results would be more even.

The test https://gist.github.com/alexeypetrushin/f2fc65c6e9f4a10ac3cc

Would be interesting to know what do you think about it? Maybe there are 
points I missed?

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/76985c32-2420-4744-baef-976398aadcba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to