attack-website
attack-website copied to clipboard
Pregenerate Search Index & Reduce IndexedDB Footprint
At present, the search index is generated client-side. There is no reason why it can't be generated server-side (by the GitHub Actions pipeline), and delivered to users in a file. This would eliminate the initial delay observed when a user performs their first search query before the FlexSearch index has been generated. In other words, generating the search index search-side should improve search speed by a large factor.
In doing so, we can also stop persisting the entirety of the index.json
contents in the IndexedDB, thus reducing the overall storage footprint and improving the load performance, since fewer IndexedDB transactions are made.