3 ms·
Oh, it is completely irrelevant! I just want a data point for my mental model of gzip performance. Specifically, I am curious if the optimizations (object table
by conradev 4y ago
Oh, it is completely irrelevant! I just want a data point for my mental model of gzip performance. Specifically, I am curious if the optimizations (object tables and separator elimination) are made irrelevant by gzip's dictionary, or if they result in better compression
- twawaaay 4y agoIn my experience it should not make much or any difference. I had devs try to "optimise" the JSON our services were returning by doing things like abbreviating field names that were repeated very often or replacing long string constants with short integers or removing formatting, and so on. When I asked them to do actual test when the service returns gzipped output and they found out that even reducing the JSON size this way by half does not make any measurable difference on the compressed stream in most cases.
- dreamdeath 4y agoI found the same re: compressed stream, however I also found that hand optimizing the decompressed JSON made for significant performance improvements on underpowered devices (e.g. some old Android phone).
- twawaaay 4y agoWell, that's true. But if performance is more important to you, just skip it and go for binary formats that can be orders of magnitude more efficient. In general text formats are a compromise. They are bulky and and inefficient to parse. What you get in exchange is ease of development. If you are willing to complicate the format just to improve performance, at some point you no longer get ease of development and you should just switch to binary altogether.