Re:A tiny static full-text search engine using Rust and WebA...
by speedgoose on Wednesday June 10, 2020 @01:43AM
(#23474320)
JSON can be compressed very well and while your advices are very good, once you compress it's not very important anymore.
- Stripping all whitespace from formatted JSON can make a huge difference
- Making property names shorter (these get repeated for every element in a large dataset!)
- If your data is relatively flat, you could replace an array of objects with an array of arrays
Or you could go all the way and serve data in CSV format, which is very space-efficient and has the neat property of being tolerant of being broken up into pieces. Though it may not parse as quickly, since JSON has native parsing support from the browser.