Hi Shubhra,

Very nice, detailed article. It explains the standard GC methods that the 
V8 uses. I've also skimmed

What I'd like to add is a little bit of wisdom I've picked up at the 
MLOC-JS.com conference in Budapest this February. Ben Titzer from Google 
Chrome division was explaining a little bit of this, how does GC work in 
V8, and he's shared a great tip:

    create as many objects as you can and just discard them.

They're putting a lot of effort into new-gen optimization - it is a lot 
smaller but a lot faster. When your objects get promoted to tenured 
generation space, then it's a lot more work for V8 to manage them + the 
space size itself is bigger, all of which adds a bit overhead.

So what he has said is not to be afraid to just create as many objects as 
you need and just keep discarding that. 

I guess that translates to "create as many small local scoped vars as you 
need, and V8 will take care of it all".

Or perhaps I've misunderstood it all. 


On Wednesday, June 25, 2014 7:01:16 PM UTC+2, Shubhra Kar wrote:
>
> Coming into Node from a Java background GC always intrigued me. The JVM 
> and CLR have this mastered as a science.
>
> Here is what I discovered for Node and V8. Should be helpful to newbies
>
> http://strongloop.com/strongblog/node-js-performance-garbage-collection/
>
> Kind Regards,
> Shubhra Kar
>
> Product Manager - StrongLoop
>
> *Rapidly **develop APIs* 
> <http://strongloop.com/mobile-application-development/loopback/>* in 
> Node.js, plus get **DevOps capabilities* 
> <http://strongloop.com/node-js-performance/strongops/>* like monitoring, 
> debugging and clustering.*
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/a416eae0-5d52-4d47-802b-6de01854a846%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to