Home Technology Deno 1.26 improves text encoding and file processing performance, and strengthens support for Node.js | iThome

Deno 1.26 improves text encoding and file processing performance, and strengthens support for Node.js | iThome

by admin
Deno 1.26 improves text encoding and file processing performance, and strengthens support for Node.js | iThome

The JavaScript and TypeScript execution environment Deno has released the latest version 1.26. The update of this version focuses not only on performance improvement, but also on improving the compatibility between Node.js and NPM. According to the official announcement, the performance improvement work they have been working on internally will reduce latency and processing overhead by solving bottlenecks, and the full results will be released in the near future.

However, compared with the 1.24.3 version, Deno 1.26 has made some preliminary progress in the performance improvement part, such as encoding the text into the existing TypedArray, the maximum throughput of small loads is increased to 5 times, and the larger payloads It is increased to 30 times, and the speed of synchronous writing to Deno.writeFileSync() is also increased by 1.44 times, and the speed of asynchronous writing to Deno.writeFile() is also slightly increased by 1.15 times.

Previously, due to the official change of Deno text decoding method, the performance of CSV parsing decreased, but now the official has started to improve it. In the benchmark test, this version has a performance improvement of 1.36 times on Mac and a speedup of 1.15 times on Linux. In addition, the parsing speed of URLs without query strings is now increased by 2.27 times, and the parsing speed of complex URLs with multiple query string parameters is also increased by 1.37 times.

The development team has made many improvements to Deno’s file system operations. Compared with version 1.24.3, the performance of many file operations has been improved by different degrees (below). On MacOS, Deno.copyFileSync will use APFS as much as possible when writing. Duplicate this system call for optimal strategy.

See also  Nintendo Switch OLED Pokémon Scarlet and Violet Editions Announced - Pokémon Scarlet/Violet - Gamereactor

Image credit / Deno Land

Deno 1.26 adds several API implementations that were not previously supported in the Node.js compatibility layer. In addition, the test suite for the entire compatibility layer has been updated. Previously, the test suite only supported Node.js 16.13.0, and now it has been Compatible with Node.js 18.8.0, the official explanation is that this work is to prepare for Node.js 18 to enter long-term support in October.

The Node.js streaming implementation in Deno has been updated to use the [email protected] NPM module, an update that will allow Deno to better keep up with major updates. Deno adds support for the cache API in this version, which allows developers to cache request/response objects. The development team mentioned that this feature is very helpful when dynamically generating responses, allowing developers to cache GET requests. Responses, and provide responses to similar requests from the cache. Deno 1.26 also ships with the latest TypeScript stable version 4.8.

You may also like

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Privacy & Cookies Policy