Benjamin, out of curiosity how slow is slow? What are the absolute startup time numbers?
On Tue, Jul 30, 2013 at 5:52 AM, Ben Noordhuis <[email protected]> wrote: > On Tue, Jul 30, 2013 at 8:46 AM, Benjamin Pasero > <[email protected]> wrote: >>> ok, so far I have not heard a technical reason. the fact that require() >>> returns module.exports obviously would have to change to AMD require with >>> callback. And the order of modules could probably be ensured by using a >>> similar approach as requireJS load order >>> (http://requirejs.org/docs/1.0/docs/api.html#order). > > There are no doubt modules on npm that implement AMD-style module > loading. If there aren't, you should be able to implement it quite > easily. > > That said, I don't think I/O will be your only bottleneck when loading > 10k JS files (unless none of those files are in the operating system's > file cache, then I/O will probably dominate). I expect that V8 will > spend a non-negligible amount of CPU time parsing and compiling all > that source code. Seems like a case where precompiled JS files would help. We did some work on this at some point investigating whether V8's snapshot facility could be extended to Node's library or even user code. My vague memory of the conclusion was: it would be very difficult but perhaps doable. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: 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 post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- 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]. For more options, visit https://groups.google.com/groups/opt_out.
