News

Introducing Node.js 12 with V8 JavaScript engine, improved worker threads, and much more

2 min read

Today, the team behind Node.js announced the release of Node.js 12 with new updates and features including faster startup and better default heap limits, updates to V8, and much more. This release replaces version 11 in the current release line. With the release of version 12,  Node.js release line will soon become Node.js Long Term Support (LTS) which will release in Oct 2019

What’s new in Node.js 12?

V8 Javascript engine v7.4

A new version of the V8 JavaScript engine comes with improved performance, language, and runtime. The team has added a new feature called zero-cost async stack traces, that improves the error.stack property with asynchronous call frames.  With V8 v7.4, there are faster calls with arguments mismatch. Even the JavaScript parsing has got faster.

TLS 1.3

This version of Node.js comes with TLS1.3 (Transport Layer Security) support which is now the default max protocol. This release also supports CLI/NODE_OPTIONS switches in order to disable it, if required.

Configure default heap limits

With Node.js 12 release, the JavaScript heap size is configured based on available memory instead of using defaults which were set by V8 for use with browsers. Now with the help of this configuration, Node.js won’t try to use more memory than is available and would terminate when its memory is exhausted. This feature is highly useful while processing large data-sets.

Switch default http parser to llhttp

This release will also switch the default parser to llhttp which will be beneficial to make testing and comparing the new llhttp-based implementation easier.  

Making native modules get easier

Node.js 12 makes building and supporting native modules easier. The new changes include better support for native modules in combination with Worker threads. Users can now use their own threads for native asynchronous functions.

Worker threads

In this release, the worker threads don’t require the use of a flag. With this release, additional threads can be leveraged whenever required for better results.

Diagnostic reports

Node.js 12 comes with a new experimental feature called diagnostic report which allows the users to generate a report on demand. The report contains information that can be useful for diagnosing problems in production including crashes, high CPU usage, slow performance, memory leaks, unexpected errors and more.

Read Next

Google is planning to bring Node.js support to Fuchsia

Node.js and JS Foundations are now merged into the OpenJS Foundation

7 Best Practices for Logging in Node.js

Amrata Joshi

Share
Published by
Amrata Joshi

Recent Posts

Top life hacks for prepping for your IT certification exam

I remember deciding to pursue my first IT certification, the CompTIA A+. I had signed…

3 years ago

Learn Transformers for Natural Language Processing with Denis Rothman

Key takeaways The transformer architecture has proved to be revolutionary in outperforming the classical RNN…

3 years ago

Learning Essential Linux Commands for Navigating the Shell Effectively

Once we learn how to deploy an Ubuntu server, how to manage users, and how…

3 years ago

Clean Coding in Python with Mariano Anaya

Key-takeaways:   Clean code isn’t just a nice thing to have or a luxury in software projects; it's a necessity. If we…

3 years ago

Exploring Forms in Angular – types, benefits and differences   

While developing a web application, or setting dynamic pages and meta tags we need to deal with…

3 years ago

Gain Practical Expertise with the Latest Edition of Software Architecture with C# 9 and .NET 5

Software architecture is one of the most discussed topics in the software industry today, and…

3 years ago