TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Pushing the performance limits of Node.js

31 pointsby henridfover 9 years ago

4 comments

feinover 9 years ago
&gt; one effective way that we get high performance out of node.js is to avoid doing computation in node.js.<p>And therein lies the problem with node. Its great for rapid prototyping, but things fall apart pretty quickly with CPU laden tasks. That and the whole single threaded thing with node (technically JS) can be a wrecking ball when one task takes too long.
评论 #10131883 未加载
评论 #10132140 未加载
评论 #10132412 未加载
评论 #10131899 未加载
xlm1717over 9 years ago
I had never read about that 1.5GB heap limit. I&#x27;ve come across that same error message - FATAL ERROR: JS Allocation failed - process out of memory - several times in my application but googling never gave me a good answer why this was happening, especially since I had a lot of spare memory on the server. Very good thing to know...
abritinthebayover 9 years ago
Seems to me like there&#x27;s very little new here to anyone paying attention to the space. They didn&#x27;t raise any limits - they just fixed their own badly written code.<p>The 1.5 gig limit is not widely known (it&#x27;s a limit of V8 and I believe, correct me if I&#x27;m wrong here, that it&#x27;s improved in later versions due to some changes to GC) but if you&#x27;re hitting it you&#x27;re doing something <i>massively</i> wrong: like they were here.<p>Splitting data up into chunks for the event loop to process is priority one in any Node app that deals with data processing. It has been for a long time. This is true <i>anywhere</i> you run JavaScript. It&#x27;s where libraries like [Highland](<a href="http:&#x2F;&#x2F;highlandjs.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;highlandjs.org&#x2F;</a>) excel and why Node has the concept of Buffers.<p>Chunking data should be a no brainer and it&#x27;s frankly a little strange that Jut weren&#x27;t doing this in the first place. Raises questions about what else is not being done correctly under the hood.<p>There&#x27;s no meat here (aside from learning that NPM uses them).
KAdotover 9 years ago
&gt; In fact, as of this writing, the JPC depends on 103 NPM packages<p>It&#x27;s really scary that you need so many packages to build a web app using Node.js.
评论 #10131978 未加载
评论 #10131952 未加载