▲ | truth_seeker 4 days ago | |
JSON Serialization, seriously ??? Why not "application/octet-stream" header and sending ArrayBuffer over the network ? | ||
▲ | kentonv 4 days ago | parent [-] | |
Because JSON serialization is built into the browser. I'm obviously a huge fan of binary serialization; I wrote Cap'n Proto and Protobuf v2 after all. But when you're working with pure JS, it's hard to be much faster than the built-in JSON implementation, and even if you can beat it, you're only going to get there with a lot of code, and in a browser code footprint often matters more than runtime speed. |