You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The data gets over half a megabyte during busy hours and is still a couple hundred kilobytes during slow hours. Some testing should be done with compression. Ideally, the decompressor should be small and very fast:
small because otherwise it defeats the whole purpose. If it's bigger than a few functions, thus requiring a separate file and probably adding another roundtrip, it already kind of defeats the purpose.
fast because we already spend enough CPU time parsing this monster.
I'm thinking of some simple string replacements, possibly making it a binary format, but my thoughts still focus on a substitution scheme for JSON. It's probably better to do some testing with existing algorithms like deflate, though I wonder how fast bitwise operations are going to be in Javascript (namely Huffman).
Compression time is not an issue, within bounds of course.
The text was updated successfully, but these errors were encountered:
I had a go at this... and then discovered my server already gzips the data. My custom lz77 implementation was completely redundant, and while it was fine in Javascript, in PHP it was way too slow.
Additionally I have removed some unused fields (mod_crc and game_secret) from the data, making it smaller still.
The download size is currently under 100KB and I doubt it's going to get much better without a disproportional amount of work, so I am closing the issue.
The data gets over half a megabyte during busy hours and is still a couple hundred kilobytes during slow hours. Some testing should be done with compression. Ideally, the decompressor should be small and very fast:
I'm thinking of some simple string replacements, possibly making it a binary format, but my thoughts still focus on a substitution scheme for JSON. It's probably better to do some testing with existing algorithms like deflate, though I wonder how fast bitwise operations are going to be in Javascript (namely Huffman).
Compression time is not an issue, within bounds of course.
The text was updated successfully, but these errors were encountered: