Skip to content

[6.1] Only show the Scheduling Indexing progress if no indexing tasks are currently happening #2052

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

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Mar 11, 2025

  • Explanation: Since Use the new SwiftPM API to load the build plan #1973, we are watching for all changes in SourceKit-LSP. This means that we get notified every time the index database is changed. Each of these modifications triggers a new task that waits for build system updates to determine if the modified file needs to be re-indexed. While this task finishes very quickly, it still causes Scheduling indexing to replace the Indexing x / y in the index status during initial indexing, which looks very noisy. To avoid this flickering, only show Scheduling indexing in the index status if we aren’t already indexing any files
  • Issue: rdar://146775333
  • Scope: Index progress status
  • Original PR: This is a significantly reduced version of Don't wait for build graph generation when file is changed #2051
  • Risk: Low, this only changes the precedence of status messages in the indexing status
  • Testing: Manually verified that we don’t see Scheduling indexing appear during initial indexing of a package
  • Reviewer: @bnbarham

… currently happening

- **Issue**: Since swiftlang#1973, we are watching for all changes in SourceKit-LSP. This means that we get notified every time the index database is changed. Each of these modifications triggers a new task that waits for build system updates to determine if the modified file needs to be re-indexed. While this task finishes very quickly, it still causes `Scheduling indexing` to replace the `Indexing x / y` in the index status during initial indexing, which looks very noisy.
- **Explanation**: To avoid this flickering, only show `Scheduling indexing` in the index status if we aren’t already indexing any files
- **Scope**: Index progress status
- **Original PR**: This is a significantly reduced version of swiftlang#2051
- **Risk**: Low, this only changes the precedence of status messages in the indexing status
- **Testing**: Manually verified that we don’t see `Scheduling indexing` appear during initial indexing of a package
- **Reviewer**: @bnbarham
@ahoppen ahoppen requested a review from bnbarham March 11, 2025 03:34
@ahoppen ahoppen changed the title Only show the Scheduling Indexing progress if no indexing tasks are currently happening [6.1] Only show the Scheduling Indexing progress if no indexing tasks are currently happening Mar 11, 2025
@ahoppen
Copy link
Member Author

ahoppen commented Mar 11, 2025

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Mar 11, 2025

@swift-ci Please test macOS

@ahoppen ahoppen merged commit 62ffca4 into swiftlang:release/6.1 Mar 11, 2025
3 checks passed
@ahoppen ahoppen deleted the 6.1/schedule-indexing-progress branch March 11, 2025 18:36
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