Open msiebuhr opened 12 years ago
An alternative could be offloading the heavy lifting stuff to web workers to keep the interface responsive.
Another way could be to include some top percentage of the codes in the initial download.
Picking all these out from the main data-set weighs in at 11KB gzipped (66KB plain), which would still be quite a win.
jq '[.[] | select(.b == "ascii" or .b == "misc_symbols" or .b == "misc_pictographs")]' -c data.json | gzip | wc -c
BTW. misc_pictographs
alone would weigh in a 7KB gzipped.
Considering the background image is 11KB compressed and the JS-bundle is 45KB, I think we'd be OK all of the proposed subsets.
The application halts slow machines/devices quite a lot, so perhaps we should split the index into smaller parts - possibly with various-size chunks, so we can adapt to faster/slower machines and network connections. Eg. naming
data-FROM%-TO%.json
:Then the client could start out downloading
data-0-10.json
and parse it. If that takes to long, degrade to 5% chunks, and if It's fast, upgrade to 25%-chunks.We'd have to have some more data lying around (about 2MB per size), and - more difficult - figure out a dynamic download client.