feat: batch initial file load and improve progress messaging#1399
Merged
Conversation
The JuliaWorkspaces progress callback reports (key, message, percentage) per operation; a worker task keeps one work-done-progress token per key, so concurrently running operations (cache downloads, indexing different projects, loading caches) each get their own client progress bar with the full 0-100 range. A report with percentage >= 100 ends its key's bar and queues the diagnostics refresh; ending a key without an open bar is a no-op. The callback itself only enqueues reports and never blocks: it is invoked from the JuliaWorkspaces dynamic-feature reactor, which must not stall on the blocking window/workDoneProgress/create client round-trip. Reports arriving while a token is being created queue up and are delivered in order. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Every file used to be added via add_file!, each call re-deriving the required dynamic projects and draining dynamic results. Collecting the files first and adding them with one add_files! call makes the initial load linear and lets cache downloading/indexing start right after the batch instead of after the whole per-file load. Also yield while walking workspace folders so other tasks (the dynamic-feature reactor, the client connection) stay responsive. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Requires julia-vscode/JuliaWorkspaces.jl#119.