3 ms·
One thing you can do is make the data itself more concise: - Stripping all whitespace from formatted JSON can make a huge difference - Making property names s
by _bxg1 6y ago
One thing you can do is make the data itself more concise:
- 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.
- speedgoose 6y agoJSON can be compressed very well and while your advices are very good, once you compress it's not very important anymore.