olivernn / lunr.js

A bit like Solr, but much smaller and not as bright
http://lunrjs.com
MIT License
8.89k stars 548 forks source link

Issues loading pre-builded indexes on mobile #429

Closed smontlouis closed 4 years ago

smontlouis commented 4 years ago

I have a 16mo index to load on mobile. Unfortunately JSON.parse is not asynchronous, nor fast and it blocks the UI + take 3+ secondes to load.

Is there any other way to load the index ? Or any other lib I could use ?

olivernn commented 4 years ago

There are definitely asynchronous versions of JSON.parse, I haven't used any enough to recommend a particular library though. Anything that parses JSON could be used and the result passed to lunr.Index.load.