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
TypeDoc loads search index before the user has a chance to start typing in the search bar
Actual Behavior
For large indexes (we have a 17MB one) loading the index takes up to 6-7s. Most of this time is spent in parsing and loading the object literal.
Suggestion
Use JSON.parse("<index data>") instead to load the index. JSON parsing is much faster than JS parsing as the grammar is simpler, and when the index is large the difference is quite big.
Steps to reproduce the bug
It's hard to reproduce this without actually sharing our existing index. If needed I can create a dummy repository
Environment
Typedoc version: 0.21.6
TypeScript version: 4.3.5
Node.js version: 14
OS: Windows 10
The text was updated successfully, but these errors were encountered:
Search terms
JSON.parse, load, search, performance, searchData
Expected Behavior
TypeDoc loads search index before the user has a chance to start typing in the search bar
Actual Behavior
For large indexes (we have a 17MB one) loading the index takes up to 6-7s. Most of this time is spent in parsing and loading the object literal.
Suggestion
Use
JSON.parse("<index data>")
instead to load the index. JSON parsing is much faster than JS parsing as the grammar is simpler, and when the index is large the difference is quite big.Steps to reproduce the bug
It's hard to reproduce this without actually sharing our existing index. If needed I can create a dummy repository
Environment
The text was updated successfully, but these errors were encountered: