perf: optimize command palette ranking, slim index, and lazy-load preview content #47
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "perf/command-palette-optimizations"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary of Changes
Search Index Size Optimization:
public/search-index.jsonfrom ~25 MB to ~4.9 MB by omitting giant HTML bodies on talents, feats, drawbacks, and rules while keeping search metadata, snippets, and prerequisites.SearchItem.talent.Zero-Allocation Hot-Path Search Scoring:
singularizeTagand inner-loop regexes fromsearchRank.tsandtagStyles.ts._nameClean,_tagsJoined,_groupClean,_snippetLower,_prereqsClean) to execute queries with pure native substring and string comparisons in ~1.6ms across 10,411 items.Smooth Command Palette Input & Lazy Loading:
useDeferredValuefor search query handling so text entry is never blocked by filtering/ranking.rankItemsexecution insidehandleQueryChange.public/preview-content/<page>.jsonfor preview drawer.