Y
Hacker News
new
|
ask
|
show
|
jobs
by
blackysky
4611 days ago
readFileSync ... not good not good .... nodejs is sexier async ;)
1 comments
wcummings
4611 days ago
node.js is sexier when it doesn't serve stacktraces in production. Plus async files reads still happen in an internal threadpool (one thread per core, hardcoded, IIRC) so it's pretty easy to saturate that anyway, you should be caching static assets.
link
Jare
4611 days ago
The express framework activates the view cache by default when configured for production, so both problems are actually the same.
link
wcummings
4611 days ago
I suspect it's not configured for prod, since I'm seeing a stacktrace
link
blackysky
4611 days ago
you are right but I'll still use async over sync anytime... :)
link
Jare
4611 days ago
You will often prefer to use sync for one-time loads or for debugging.
link