Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Node.js High Performance

You're reading from   Node.js High Performance Take your application to the next level of high performance using the extensive capabilities of Node.js

Arrow left icon
Product type Paperback
Published in Aug 2015
Publisher
ISBN-13 9781785286148
Length 136 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Diogo Resende Diogo Resende
Author Profile Icon Diogo Resende
Diogo Resende
Arrow right icon
View More author details
Toc

Summary

You now see that the garbage collector task is not all that easy, but it certainly does a very good job managing memory automatically. You can help it a lot, especially if you are writing applications with performance in mind. Preventing the GC old space from growing is necessary to avoid long GC cycles. Otherwise, it can pause your application and sometimes force your services to restart. Every time you create a new variable, you allocate memory and inch closer to a new GC cycle. Even after understanding how memory is managed, you sometimes need to inspect your memory usage behavior. The cleanest way is by collecting snapshot heaps of the memory stack and analyzing using the V8 inspector or other similar pieces of software. The interface is self-explanatory, and leaks will show up simply if you sort the object list by shallow size, retained size, or reference counting. But before creating an application with a huge memory footprint, take a look at databases, whether relational...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image