Skip to content

Isolate-based access to the SDK index (but not used yet). #8793

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
May 28, 2025

Conversation

isoos
Copy link
Collaborator

@isoos isoos commented May 27, 2025

  • SDK search index improvements (tracking issue) #8670
  • refactored and reused the package index's code into a bit more generic runIsolateFunctions to handle the initialization and message passing on the service isolate side
  • added a test that runs the SDK index in an isolate, will update the search service to use it in a subsequent PR

@isoos isoos requested review from jonasfj and sigurdm May 27, 2025 15:45
Copy link
Contributor

@sigurdm sigurdm left a comment

Choose a reason for hiding this comment

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

Code looks OK, but I'm not sure why we want this...
Is it for parallel processing?

@isoos
Copy link
Collaborator Author

isoos commented May 28, 2025

Yes, the goal would be to run the SDK index search on a different isolate, in the hope that the overall latency could go down.

I think it is worth to merge this (for the _isolate.dart refactor is useful on its own), and as a next step, I will do a local benchmark with one vs two separate isolates. I think the overhead won't be that much compared to the latency gains, and on our search instances we have 2 CPUs, one of which is mostly idle (except for the time when the isolate refresh happens).

@isoos isoos merged commit 1203886 into dart-lang:master May 28, 2025
59 of 60 checks passed
@isoos isoos deleted the sdk-isolate branch May 28, 2025 12:57
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