Skip to content

Commit

Permalink
Add a paragraph about WASM file size
Browse files Browse the repository at this point in the history
  • Loading branch information
daoudclarke committed Nov 3, 2024
1 parent fe52a4d commit 5022ac2
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions content/articles/reranking-on-the-client-side.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,19 @@ disaster. But I can build small bits in Rust, especially if I have
already built them in Python. So over the last few days, I've [rebuilt
our heuristic ranking in Rust](https://github.com/mwmbl/rankeval/).
The rust compiles to web assembly which will eventually be called from
our [excellent new front end](https://alpha.mwmbl.org/). Now all the
back end needs to do is pull out pre-ranked results for each unigram
and bigram. These can be easily cached, and potentially even kept in
cloud storage. If we are ever going to serve millions of users on our
shoe-string budget, then this is how we will have to do it.
our [excellent new front end](https://alpha.mwmbl.org/). The WASM file
is currently 1.3M with optimizations turned on, which is larger than
I'd like. Gzipped it is 491K which doesn't seem too bad. And the
client only needs to load it once, until we change our ranking
algorithm.

It is likely that we will still need to do some ranking on the server
side, for low-powered devices, and possibly API clients. But with
client-side ranking, all the back end needs to do is pull out
pre-ranked results for each unigram and bigram. These can be easily
cached, and potentially even kept in cloud storage. If we are ever
going to serve millions of users on our shoe-string budget, then this
is how we will have to do it.

If you would like to get involved, join us on our
[Matrix server](https://matrix.to/#/#mwmbl:matrix.org), or send a pull
Expand Down

0 comments on commit 5022ac2

Please sign in to comment.