Around 15 seconds to load 300 files when UNC hasn't cached any files. We will change this situation by avoiding UNC drive to host node.js and instead use a local disk. On my local SSD user code gets hit around 780ms after server startup. So, 780ms is spent in require() calls and compile calls. This makes about 50% of the entire startup time of my server (the rest is spent doing stuff on startup).
On Tuesday, July 30, 2013 10:15:30 PM UTC+2, Ryan Dahl wrote: > > 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]<javascript:>> > wrote: > > On Tue, Jul 30, 2013 at 8:46 AM, Benjamin Pasero > > <[email protected] <javascript:>> 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.
