Skip to content

Reduce settings change noise - #14622

Open
bobbrow wants to merge 1 commit into
mainfrom
bobbrow/reduceSettingsChangeNoise
Open

Reduce settings change noise#14622
bobbrow wants to merge 1 commit into
mainfrom
bobbrow/reduceSettingsChangeNoise

Conversation

@bobbrow

@bobbrow bobbrow commented Jul 29, 2026

Copy link
Copy Markdown
Member

While testing the other PR for ensuring language client readiness, we saw excessive calls to onDidChangeSettings. These have been around for a while and it turns out that there is a filtering API on the event that we can use to skip over settings changes that we don't care about. It's not perfectly granular, but does reduce the number of "no op" settings change events we need to process on the native side.

Tested with single folder workspace, multi-root workspace, and no folder opened workspace.

@bobbrow
bobbrow requested a review from a team as a code owner July 29, 2026 20:40
@github-project-automation github-project-automation Bot moved this to Pull Request in cpptools Jul 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reduces unnecessary Language Server settings-change handling by filtering onDidChangeSettings to only run when configuration changes affect relevant settings sections, lowering native-side no-op processing.

Changes:

  • Adds ConfigurationChangeEvent.affectsConfiguration(...) filtering to skip irrelevant configuration change events.
  • Limits settings-change propagation to the C_Cpp, files, editor, search, and workbench sections (scoped per client root URI).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +296 to +298
if (['C_Cpp', 'files', 'editor', 'search', 'workbench'].some(section => event.affectsConfiguration(section, client.RootUri))) {
void client.onDidChangeSettings(event).catch(logAndReturn.undefined);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pull Request

Development

Successfully merging this pull request may close these issues.

4 participants