3 ms·
Then you can upload index up to 1MB and still have decent performance https://developers.cloudflare.com/workers/about/limits/#number-of-scripts https://develope
by bitskyx 6y ago
Then you can upload index up to 1MB and still have decent performance https://developers.cloudflare.com/workers/about/limits/#number-of-scripts https://developers.cloudflare.com/workers/about/limits/#numb...
- omn1 6y agoThat's a good idea. In my case, I wanted a static search that I could deploy next to my content. Cloudflare workers would require a (free) account, but most importantly they wouldn't work full offline. For bigger indices, that would be a great trade-off, though. If you like, you can try pushing tinysearch to a worker using wasm-pack. It's all Rust in the end, so you'd only need to add a `/search` route e.g. with hyper (https://github.com/hyperium/hyper https://github.com/hyperium/hyper). If you're willing to experiment with this, don't hesitate to open a pr/issue on Github and we can add that feature.
- tmzt 6y agoIt would be interesting to see a hybrid approach: * server side WASM such as cloudflare workers and kv to build and maintain the index * streaming copy of the simplified index to be pulled in by a browser-side wasm * queries that go beyond the simple index forwarded to the worker One way of simplifying would be to limit search terms to a certain length, or only expose the most popular results. By sharing wasm code the format can be optimized and not require a compatibility layer or serdes.