-
-
Notifications
You must be signed in to change notification settings - Fork 752
Description
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
- Typedoc version: 0.21.6
- TypeScript version: 4.3.5
- Node.js version: 14
- OS: Windows 10
Metadata
Metadata
Assignees
Labels
No labels