jeffcarp / chinesedict

A fast web frontend to CC-EDICT
https://chinesedict2.web.app/
Other
2 stars 2 forks source link

Rebuild search to be more efficient #5

Open jeffcarp opened 9 months ago

jeffcarp commented 9 months ago

Currently the dictionary is delivered to the frontend as a 3.4MB gzipped JSON list of entries. For search, this requires iterating through each entry to find matches (121K total). This is less than ideal, but has worked so far because modern browsers are fast.

What would be better is:

Also, optionally (and this should be a separate bug):

cc @jagLas

Before embarking on a huge rewrite, there is already a project that has built a ton of infrastructure around parsing and processing CC-CEDICT, so it'd be worth seeing if any of that could be leveraged here: https://github.com/mreichhoff/HanziGraph/tree/main/scripts