-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only download index + WASM when someone actually searches #102
Comments
Just to add that the wasm file can be compressed down to 93K (not sure if Even though it's interesting to have the full index for offline searchs :) |
I wonder if it's possible to delay the This wouldn't affect the WASM download (I'd have to do that within Stork), but it would delay the index download, which might help. Either way, this is definitely a good idea, and I'll look into this further. Thanks! |
Hi all - I'm going to close this issue as solved when #131 is merged. #131 will add some new API methods to the Javascript I'm hoping that this new API will get published in version 1.1.0. Let me know if this doesn't work for you (though I think it will!) and we can continue the conversation. Thanks, |
Hi,
Making some progress getting going, and it looks like WASM is 400KB, index for my site is 600KB (gzipped it's 200KB, so hopefully CDN will shrink it down to the latter). Even so, this is still a bunch of downloads for someone who isn't actively using search, and it seems like both get downloaded automatically even for users who aren't searching.
There's some work that could be done to shrink the WASM, I imagine, based on the tinysearch writeup (https://endler.dev/2019/tinysearch), but also it would be nice if download of WASM +
.st
file only happened if user clicks in the search box. At that point the cost of using Stork to most users is just the cost of thestork.js
.There are many places where a 1MB download is quite expensive (https://a4ai.org/new-mobile-broadband-pricing-data-2018), so it would be nice to minimize unnecessary downloading.
The text was updated successfully, but these errors were encountered: