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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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.

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.

2 participants