Skip to content

search-index.js slows down documentation browsing #56545

Closed
@yacoob

Description

@yacoob

I'm just starting with Rust, so I'm using its documentation quite often. Primarily along the lines of "hmm, no idea if a thing like foo exists in stdlib... let's search the docs.". This means, I'm changing pages of documentation a lot. I've noticed that when I'm jumping to a specific method's docs, I get the following experience:

  • page loads entirely (judging by the side scrollbar)
  • load indicator keeps spinning
  • after couple of seconds, browser jumps down to method description

I've looked at Chrome's console, and I've noticed that search-index.js is the culprit.

screen shot 2018-12-05 at 19 34 08

Note that the above is loading from a file:// URI, after launching rustup doc. That index is 2MB, and it looks like it contains all keywords for the search. Not sure why it's equally slow on both online and local docs.

Any chance of improvement here, to speed up the initial load? Loading the index asynchronously, to have it ready for user search once user decides to use it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions