Skip to content

Debounce filesBuildSettingsChanged calls #2020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Feb 28, 2025

This helps in the following situation: A build system takes 5s to return build settings for a file and we have 10 requests for those build settings coming in that time period. Once we get build settings, we get 10 calls to resultReceivedAfterTimeout in buildSettings(for:in:language:fallbackAfterTimeout:), all for the same document. But calling fileBuildSettingsChanged once is totally sufficient.

This helps in the following situation: A build system takes 5s to return build settings for a file and we have 10 requests for those build settings coming in that time period. Once we get build settings, we get 10 calls to `resultReceivedAfterTimeout` in `buildSettings(for:in:language:fallbackAfterTimeout:)`, all for the same document.
But calling `fileBuildSettingsChanged` once is totally sufficient.
@ahoppen
Copy link
Member Author

ahoppen commented Feb 28, 2025

@swift-ci Please test

@ahoppen ahoppen merged commit 4e44553 into swiftlang:main Feb 28, 2025
3 checks passed
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.

2 participants