---
title: "Taming event loop lag"
publication: "Node Weekly"
issue: 538
published_at: "2024-07-02"
canonical_url: "https://nodeweekly.com/issues/538"
---

Plus some Node.js security releases are on the way. |        

#​538 — July 2, 2024 

[Read on the Web](https://nodeweekly.com/issues/538)  

Together with [![Frontend Masters logo\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,w_300,h_70/e_make_transparent/co_white,e_outline:5/nk0tfdvalivacz8rw7rt.png)](https://frontendmasters.com/courses/server-graphql-nextjs/?utm_source=email&utm_medium=nodeweekly&utm_content=graphql-nextjs)  

![Node.js Weekly](https://res.cloudinary.com/cpress/image/upload/v1653576619/lgfqinzbdqttwmhvljxb.png) 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/dmvofj0ria0dvlhmkoio.jpg)](https://trigger.dev/blog/event-loop-lag)  

[How We Tamed Node.js Event Loop Lag: A Deepdive](https://trigger.dev/blog/event-loop-lag) — Node famously uses very few threads yet can handle a large number of clients performantly, _as long as the work associated with each client is ‘small.’_ When you get nested loops, as in this story, however, things can go off the rails quickly. Node’s [Don’t Block the Event Loop](https://nodejs.org/en/learn/asynchronous-work/dont-block-the-event-loop) is a great further guide to this topic. 

Eric Allam   [![\](https://copm.s3.amazonaws.com/282cdbcd.png)](https://frontendmasters.com/courses/server-graphql-nextjs/?utm_source=email&utm_medium=nodeweekly&utm_content=graphql-nextjs) 

[Create Server-Side GraphQL APIs with Next.js](https://frontendmasters.com/courses/server-graphql-nextjs/?utm_source=email&utm_medium=nodeweekly&utm_content=graphql-nextjs) — Learn the GraphQL fundamentals in this video course with Scott Moss — covering type definitions, type modifiers, relationships, directives, and more. Create schemas, build queries, and use mutations to implement standard CRUD operations. Configure your server and add authentication so your API is production-ready. 

Frontend Masters sponsor   

[Node's July 2, 2024 Security Releases](https://nodejs.org/en/blog/vulnerability/july-2024-security-releases) — New Node versions on the maintained 22.x, 20.x, and 18.x release lines are expected later today to address _five_ different security vulnerabilities/issues. 

The Node.js Project   

📊 [Profiling Node.js Applications](https://betterstack.com/community/guides/scaling-nodejs/profiling-nodejs-applications/) — If you’re dealing with unusual performance issues, profiling your app can determine where the issues are arising. This tutorial offers a sample project to work on and covers profiling in a handful of different ways. 

Stanley Ulili   

[How to Perform Data Validation in Node](https://blog.appsignal.com/2024/06/19/how-to-perform-data-validation-in-nodejs.html) — Explores data validation in the Node backend, and shows us how to implement it in Express using the express-validator library. 

Antonello Zanini   

📄 [Deploying AWS Lambda Functions with Serverless Framework and Node.js](https://implementing.substack.com/p/deploy-aws-lambda-functions-with-serverless-node) Marco Moauro 

📄 [Creating an npm package with CommonJS and ESM Support in TypeScript](https://blog.mastykarz.nl/create-npm-package-commonjs-esm-typescript/) Waldek Mastykarz 

📄 [Beyond Monospace: The Search for the Perfect Coding Font](https://evilmartians.com/chronicles/beyond-monospace-the-search-for-the-perfect-coding-font) Shamin and Turner (Evil Martians)    

🛠 Code & Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/mxszyw4avmftzaf4daj0.jpg)](https://squirrelly.js.org/)  

[SquirrellyJS 9: A Powerful Template Engine](https://squirrelly.js.org/) — A modern, configurable, and fast template engine promising _“the power of Nunjucks”_ and _“the simplicity of EJS”_. There’s an [online playground](https://squirrelly.js.org/playground) if you want to see it in action. [GitHub repo.](https://github.com/squirrellyjs/squirrelly) 

Ben Gubler   

[Your Fastest Path to Production](https://render.com?utm_source=cooperpress&utm_medium=cooperpress) — Build, deploy, and scale your apps with unparalleled ease – from your first user to your billionth. 

Render sponsor   

[fast-json-stringify 6.0: 2x Faster than `JSON.stringify()`?](https://github.com/fastify/fast-json-stringify) — Boasts being significantly faster than `JSON.stringify()` particularly for _small_ payloads, with its performance advantage shrinking as your payload grows. 

Fastify   

[Dats 5.1: A Minimal Zero-Dependency `statsd` Client Library](https://github.com/immobiliare/dats) — [StatsD](https://github.com/statsd/statsd) is a stats/metrics aggregation service originally developed at Etsy. 

Immobiliare Labs   

- [Hexo 7.3](https://github.com/hexojs/hexo) – Popular blog framework / generator.
- [xero-node 8.0](https://github.com/XeroAPI/xero-node) – Node SDK for the popular _Xero_ accounting system.
- 🌈 [yoctocolors 2.1](https://github.com/sindresorhus/yoctocolors) – Smallest terminal text coloring library.
- [MongoDB Node.js Driver 6.8](https://github.com/mongodb/node-mongodb-native/releases/tag/v6.8.0) – The latest official MongoDB driver.
- [js-bson 6.8](https://github.com/mongodb/js-bson/releases/tag/v6.8.0) – MongoDB BSON parser for Node and browsers.
- [ESLint 9.6.0](https://eslint.org/blog/2024/06/eslint-v9.6.0-released/)    

**Got a link for us?** Reply and tell us. We can't include everything but we'll look at anything you send. _Thanks!_ 

--- 

**Sponsorship:** Email `[kristina@cooperpress.com](mailto:kristina@cooperpress.com)` for details. 

--- 

Published by Cooper Press Ltd.
Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom 

[Cancel your subscription](https://nodeweekly.com/leave/*|UID|*) or [change your address](https://nodeweekly.com/edit_subscription/*|UID|*).
