fix(nxls): debounce PassiveDaemonWatcher callback to prevent reconfigure flood#3107
Closed
fix(nxls): debounce PassiveDaemonWatcher callback to prevent reconfigure flood#3107
Conversation
…ure flood The Nx daemon can deliver bursts of project graph recomputation notifications (16k+ observed in #3101). Without debouncing, each notification triggers a full reconfigure cycle, effectively freezing the language server. The old DaemonWatcher path already debounced at 1s — apply the same to the PassiveDaemonWatcher path. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
View your CI Pipeline Execution ↗ for commit 168e3ae
☁️ Nx Cloud last updated this comment at |
Contributor
Author
|
duplicate of #3104 (review) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PassiveDaemonWatcherlistener callback, matching the existing debounce on the oldDaemonWatcherpathFixes #3101
Context
The Nx daemon can deliver bursts of project graph recomputation notifications (16k+ observed in the logs attached to #3101). The old
DaemonWatcherpath (used for Nx < 22.5.0) already wraps its callback withdebounce(callback, 1000), but the newPassiveDaemonWatcherpath (Nx >= 22.5.0) passes the callback through directly. Each notification triggers a fullreconfigure()cycle — and whilenxWorkspace()deduplicates the project graph computation, the 16k concurrent reconfigure calls all proceed to re-register watchers and configure schemas simultaneously, freezing the language server.Test plan
🤖 Generated with Claude Code