Open LorenzoSerino opened 6 years ago
Thanks for reporting this, out of interest, how large is the serialised index that you are trying to load?
I've been thinking of providing a non JSON serialisation of the index, the original reason was to reduce the size of the index, but having some format that could be parsed in a way that is less expensive than JSON (or at least could pause to avoid these long executions) would be another benefit.
Using something like Oboe.js helps prevent iOS from crashing, but then it takes 10 times longer to parse the index.
Hello olivernn, i report there is a problem using pre-building indexes on Safari iOS
using the pre-building indexes with data dimension >= 1M : Safari stop the executing script and crashes.
The offending code line seems to be:
var idx = lunr.Index.load(JSON.parse(data))
in detail : JSON.parse(data) i try to verify the CPU time :
and the CPU time is very higth in comparison to a simple object vector/map strings. The relationship is ten to one.
I think the problem is in floating point conversion but i'm not sure.
So i gave up of pre-building indexes.