rust-lang / rust-lang/rust

Searching nightly docs is inconsistently slow

Open
#146,048 8 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-rustdoc-search C-bug regression-from-stable-to-stable T-rustdoc T-rustdoc-frontend
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Prior to the rustdoc search overhaul in #144476, it was typically the case that searching the nightly docs or nightly-rustc docs would be slow once per day (presumably when reloading the new docs), and any searches after that point would be basically instant (presumably because the index was fully downloaded and cached).

After the overhaul, it is now the case that most doc searches incur an unpredictable multi-second pause before returning any results, and continue to show a distracting throbber for several seconds after results are shown.

There doesn't appear to be any way to “preload” the full search index, which the previous implementation would do automatically.

This results in a much more frustrating experience, because most individual searches are now slow instead of fast.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing searches in the nightly std and nightly-rustc documentation linked in the issue, then read the rustdoc search overhaul from #144476. Reproduce the multi-second pauses and lingering throbber, and compare them with repeated searches before the overhaul; done means ordinary searches return promptly without the distracting post-result loading state.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.