2 ms·
You can get the best of both worlds: a synchronous programming model combined with the low memory memory usage of Node by using fibers. The trust issues relatin
by olegp 15y ago
You can get the best of both worlds: a synchronous programming model combined with the low memory memory usage of Node by using fibers. The trust issues relating to cooperative multitasking that you mention are still valid, but I haven't run into these problems in practice.
There are some benchmarks in the README to Common Node, a library that I wrote that makes using fibers easier: https://github.com/olegp/common-node#readme https://github.com/olegp/common-node#readme
Lazy loading becomes very straightforward and something I do fairly often when using e.g. https://github.com/olegp/mongo-sync https://github.com/olegp/mongo-sync