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
I am experiencing significant performance issues with lunr.js.
I have about 250 posts of 500-1000 words which means my searchengine file is about 500kb. The real killer though is execution (consistently greater than 5s).
I thought defer would be an adequate fix but it doesn't seem to be (I'm still trying to figure out why but lunr is definitely still delaying rendering).
There are a number of possible solutions here:
The most interesting one is an idea I had to use something like Cloudflare workers
Perhaps more realistic for the theme is to figure out how to adequately defer the script's execution or somehow break it into smaller async pieces.
[EDIT:] It looks to me as though I'm having the same problem as this: mkdocs/mkdocs#859
This suggests that prebuilding the index (and compressing) and using a webworker in the middle (presumably for caching) would alleviate a lot of this pain... (cf. mkdocs/mkdocs#1418)
The text was updated successfully, but these errors were encountered:
I am experiencing significant performance issues with
lunr.js
.I have about 250 posts of 500-1000 words which means my
searchengine
file is about 500kb. The real killer though is execution (consistently greater than 5s).I thought
defer
would be an adequate fix but it doesn't seem to be (I'm still trying to figure out why but lunr is definitely still delaying rendering).There are a number of possible solutions here:
[EDIT:] It looks to me as though I'm having the same problem as this: mkdocs/mkdocs#859
This suggests that prebuilding the index (and compressing) and using a webworker in the middle (presumably for caching) would alleviate a lot of this pain... (cf. mkdocs/mkdocs#1418)
The text was updated successfully, but these errors were encountered: