Profiling loopback-sample-app start-up time, from the ~6500 stat() system calls, about 2000 originate from fixFileExtension() and to a lesser extent tryResolveAppPath() in lib/compiler.js (the fs.existsSync() call - why are you using that?)
Related, I managed to bring down the number of calls from node.js core to ~2800 from ~4700 in nodejs/node#4575 by caching more aggressively. Perhaps a similar strategy is possible in lib/compiler.js?
Profiling loopback-sample-app start-up time, from the ~6500 stat() system calls, about 2000 originate from
fixFileExtension()and to a lesser extenttryResolveAppPath()inlib/compiler.js(thefs.existsSync()call - why are you using that?)Related, I managed to bring down the number of calls from node.js core to ~2800 from ~4700 in nodejs/node#4575 by caching more aggressively. Perhaps a similar strategy is possible in
lib/compiler.js?