Operation System: (Windows or Linux or MacOS)
Windows
DocFX Version Used:
All of them
Template used: (default or statictoc or contain custom template)
default
Steps to Reproduce:
- browse to https://aka.ms/kusto
- any search within the ~10 seconds of page load will return only after 10 seconds passed from time page loads.
Expected Behavior:
wait less than a second.
This is very common in documentation websites to load the page and the immediately search.
Actual Behavior:
wait for more than 10 seconds
Looks like the issue is that lunr.js is building the index on-the-fly on page-load in a search-worker.js.
but this is a static website - the index can be persisted and then just loaded instead of building an index every time.
here is documentation on that from lunr.js website on how to use pre-build indexes.
Operation System: (
WindowsorLinuxorMacOS)Windows
DocFX Version Used:
All of them
Template used: (
defaultorstatictocor contain custom template)default
Steps to Reproduce:
Expected Behavior:
wait less than a second.
This is very common in documentation websites to load the page and the immediately search.
Actual Behavior:
wait for more than 10 seconds
Looks like the issue is that lunr.js is building the index on-the-fly on page-load in a search-worker.js.
but this is a static website - the index can be persisted and then just loaded instead of building an index every time.
here is documentation on that from lunr.js website on how to use pre-build indexes.