Skip to content

Test/performance#27

Merged
sentientforest merged 23 commits intomainfrom
test/perf
Feb 5, 2026
Merged

Test/performance#27
sentientforest merged 23 commits intomainfrom
test/perf

Conversation

@sentientforest
Copy link
Collaborator

@sentientforest sentientforest commented Aug 5, 2025

The situation described in this article could be relevant to our performance issue

https://snyk.io/blog/nodejs-how-even-quick-async-functions-can-block-the-event-loop-starve-io/

Theory would be a long queue of promises keeps the Node.js event loop so backed up, the poll phase is ignored long enough that we start seeing timeouts. Because, importantly, the poll phase is where new connections can be established. Maybe the CPU gets cranking away at 100% on a loop of promises and ignores new connections, leading to the timeouts we see

Solution might be using setImmediate in places where it makes sense, rather than solely relying on async / await (edited)

@sentientforest sentientforest merged commit 20d4576 into main Feb 5, 2026
1 check passed
@sentientforest sentientforest deleted the test/perf branch February 5, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant