You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
On my laptop the home page loads to the state where it is already rendered on the screen within 2-3sec, but it's not interactive until about 8sec later.
Additional context
Running a profiler showed that between 2.5s and 8s there are no URL loading, instead all the time is spend in "scripting" in the functions of the lunr library, which we use for searching documents. As I understand, it parses the 2.4Mb index.json from the root into some internal index. index.json over time grew to be this large because it includes text content from all historical versions of the docs.
The following diff changes the index.json to only include the latest version:
This could be a stop-gap solution, but it's not ideal because the Search bar actually only shows when in the Docs, so it does make sense for that search to work within the documents of a specific version. I think a better solution would be:
remove lunr from the home page and other static pages, only show it when in the Docs pages
generate multiple index.json files for each doc/{$version} independently and only load that index for pages in that version
it would also be nice to rename this file to search.json
The text was updated successfully, but these errors were encountered:
Describe the bug
On my laptop the home page loads to the state where it is already rendered on the screen within 2-3sec, but it's not interactive until about 8sec later.
Additional context
Running a profiler showed that between 2.5s and 8s there are no URL loading, instead all the time is spend in "scripting" in the functions of the
lunr
library, which we use for searching documents. As I understand, it parses the 2.4Mbindex.json
from the root into some internal index.index.json
over time grew to be this large because it includes text content from all historical versions of the docs.The following diff changes the
index.json
to only include the latest version:This could be a stop-gap solution, but it's not ideal because the Search bar actually only shows when in the Docs, so it does make sense for that search to work within the documents of a specific version. I think a better solution would be:
lunr
from the home page and other static pages, only show it when in the Docs pagesdoc/{$version}
independently and only load that index for pages in that versionsearch.json
The text was updated successfully, but these errors were encountered: