Skip to content

Speed up search index loading #2633

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 3 commits into from
Apr 21, 2025
Merged

Conversation

GuillaumeGomez
Copy link
Member

Follow-up of #2552.

JSON.parse() is much faster than parsing JS code for JS engines. I missed this case when I removed the original JSON file. This is also how we do in rustdoc. The bigger the search index, the more noticeable it is.

As for the second commit, it fixes this JS error:

Screenshot From 2025-04-02 11-14-15

@ehuss Just to be sure: does this PR solves your 10+ seconds issue for search load?

@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label Apr 2, 2025
@GuillaumeGomez
Copy link
Member Author

Forgot to update the tests for loading the new JSON format, it's done fixed.

@GuillaumeGomez
Copy link
Member Author

@ehuss Did you have time to take a look? Do you need some extra explanations on the changes maybe?

Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

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

Thanks! I haven't done any performance tests, but I assume it should be ok.

Just to be sure: does this PR solves your 10+ seconds issue for search load?

No, the concern was just around a low-bandwidth network connection trying to load a very large index. That's purely a network constraint.

@ehuss ehuss added this pull request to the merge queue Apr 21, 2025
Merged via the queue into rust-lang:master with commit 14aeb0c Apr 21, 2025
12 checks passed
@GuillaumeGomez GuillaumeGomez deleted the speed-up-loading branch April 21, 2025 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: waiting on a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants