Over 487 people have rated [5/5]
Node JS 12 upgraded
Zero Cost Async stack traces:
This serves to enrich the error. Stack property by using asynchronous call frames without the addition of the extra runtime to the V8 Engine.
Faster calls with arguments mismatch:
Earlier, V8 had to handle all the function calls that had too many or too few parameters the same way, which had a performance cost to be borne. Now the engine developed is smart enough to know when it can skip this step. And this reduces the overhead caused by up to 60%
Faster async functions and promises:
Using async is actually two extra micro ticks faster than using promises now. If you felt that you needed a reason apart from the more synchronous- style syntax async / await provides to the developers who are not acquainted with promises
Stricter security with TLS 1.3
TLS that stands for transport layer security, is how Node handles the encrypted stream communication.
With the release of Node 12, TLS gets upgraded to version 1.3. This sounds insignificant but it proves to be a major update that has numerous performance as well as security enhancements. It sounds counterintuitive at first, TLS 1.3 is actually simpler and easier to implement than TLS 1.2, making it more secure, easier to negotiate as well as quicker to negotiate between applications.
If we use TLS 1.3, the Node applications will have increased security and heightened end-user privacy while also improving the performance of requests by reducing the time required for extra handshakes for HTTPS.
The conclusion, better and improved security for everyone and it uses less latency between communicating services.
Properly configured default heap limits
We can say goodbye to out of memory errors- at least some time when we process a large amount of data. The old –max-old-space-size flag will still be available will be available to a different limit if it is needed, but this feature will, in turn, reduce the need for setting the flag.
The default http parser is now llhttp
Unknown to many, the current http_parser library that has been used in Node has been extremely difficult to be maintained and to be improved upon. That is the reason why llhttp was born. This project is a port of the http_parser to TypeScript which is then run through llparse to generate the C or bitcode output.
It turns out that all HTTP is way faster than http_parser by about 156%. It has been written using fewer lines of code and all the performance optimizations have been generated automatically as compared to http_parser’s hand-optimized code
In NodeJS 12, the development team has decided to switch the default parser to llhttp for the first time and put it to the test. We can all hope that it continues to perform well when lots of different applications with lots of different needs are using it out.
Diagnostic reports on demand
When we switch to the conversation about debugging, there is a newer experimental feature in Node.js 12 that allows the users to generate a report on demand or when certain trigger events occur.
This kind of real-time reporting can easily help diagnose and correct the problems in production, slow performance, including crashes memory leaks, unexpected errors, high CPU usage, etc. – the kind of stuff usually takes a lot of time and hours if not days to debug, diagnose and fix.
Integrated heap dumps
Another feature in this release for Node JS is around heaps, sure to speed up the debugging process, is integrated heap dumps, which ships with Node.js 12, already built-in.
Now there’s no need to install new modules for the investigation of memory issues – just tell Node what kind of JSON-formatted diagnostic summary you want to use in the command line or an API call and you can be able to parse through all of the info.
Native modules get easier in Node.js
Stepping back up from the muff that aide low-level improvements, there’s some cool stuff also coming for developers as well as the module makers within the Node ecosystem.
Developing as well as building the native modules for Node continues to improve, with changes that now has included better support for native modules when used in combination with worker threads, as well as the version 4 release of the N-API, this has made it easier to configure your own threads for native asynchronous functions.
Startup time improvements
Node.js 11 had reduced the startup time of the worker threads by almost 60% by using built-in code cache support.
The result is that there is a 30% speed-up in startup time for the main thread, and your apps will load for users faster than ever before.
Read More: What’s new in Node.Js v12
Node JS now being 10 years old, it is single-threaded and the most widely used and adopted and yes it is not as widely adopted and used as some programming languages. Node JS is able to be used for both the client-side scripts as well as the server-side programming.