Deno 1.2 Adds HTTP Auto-Compression |
Written by Kay Ewbank | |||
Tuesday, 22 March 2022 | |||
Deno has been updated with faster calls into Rust and auto-compression of HTTP response bodies. Deno is the JavaScript and TypeScript runtime from the creator of Node.js. Deno uses V8 and is built in Rust. It is described as secure by default as it has no file, network, or environment access, unless explicitly enabled. Deno was created by the same developer who created node.js - Ryan Dahl - and its name is a rearrangement of the letters in node. The calls into Rust have been optimized and should result in a better performance. When apps using Deno run code, there's frequent communication between the JavaScript engine (V8) and the rest of Deno, which is written in Rust. In this release the developers have optimized the communication layer to be up to 60% faster. This significant boost has been achieved by using Rust proc macros to generate highly optimized V8 bindings from existing Rust code. The work provides a base for future integration with the V8 Fast API, which will further improve performance between JavaScript and Rust. The developers say that overall, because of this change and other optimizations, Deno 1.20 improves the base64 roundtrip of 1mb string from ~125ms to ~3.3ms. The next improvement is support for auto-compression for HTTP response bodies by Deno's native HTTP server. This means that if a client request supports compression and your server responds with a body that isn't a stream, the body will be automatically compressed within Deno. Elsewhere, two new subcommands have been added for benchmarking and to add a new task runner. The developers say this provides a convenient way of defining and executing custom commands specific to the development of a codebase, and is similar to npm scripts or makefiles. Deno 1.2 is available now. More InformationRelated ArticlesDeno 1.14 Improves Web Crypto Support Deno 1.10 Adds Web Storage API Support Node.js Even Its Creator Thinks Its Flawed
To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
Comments
or email your comment to: comments@i-programmer.info |