You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello olivernn, i report there is a problem using pre-building indexes on Safari iOS
iOS Resource Limits
JavaScript execution time
limited to 10 seconds for each top-level entry point. If your script executes for more than 10 seconds, Safari on iOS stops executing the script at a random place in your code, so unintended consequences may result.
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 :
var t0 = performance.now();
JSON.parse(data)
var t1 = performance.now();
console.log("Call to JSON.parse(data) took " + (t1 - t0) + " milliseconds.")
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.
The text was updated successfully, but these errors were encountered:
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.
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.
The text was updated successfully, but these errors were encountered: