Make SketchedToolServiceImpl.onStart non-blocking (265.66ms → 0.56ms) - #17953
Open
ankitsharma101 wants to merge 1 commit into
Open
Make SketchedToolServiceImpl.onStart non-blocking (265.66ms → 0.56ms)#17953ankitsharma101 wants to merge 1 commit into
ankitsharma101 wants to merge 1 commit into
Conversation
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.
What it does
SketchedToolServiceImpl.onStart()was previouslyasyncand blocked the frontend startup sequence while it resolved the config directory and readsketchedTools.ymlfrom disk. Since Theia'sstartContributionsloop awaits eachFrontendApplicationContribution.onStart()sequentially, this added the full I/O cost directly to every contribution that started afterward.This PR makes
onStart()fire-and-forget, delegating the actual work to a newprotected async doStart(). Tools still register automatically oncedoStart()completes; startup no longer waits on it. This mirrors the existing pattern inMcpFrontendApplicationContribution.onStart().Note: errors from
doStart()are now caught and logged (this.logger.error(...)) rather than propagating to the framework'sstartContributionsawait chain — consistent with howMcpFrontendApplicationContributionhandles the same situation.How to test
blink.user_timingmarks forSketchedToolServiceImpl.onStart.McpFrontendApplicationContribution.onStart(~0.45ms) as a reference point.doStart()work still completes (verified via theSketchedToolServiceImpl.settled-startmarker firing normally afterstartContributionsbegins).Follow-ups
None.
Breaking changes
Attribution
None
Review checklist
nlsserviceReminder for reviewers