4 ms·
Why not use binary data? A typed array should work (unsure of the exact APIs, though).
by underwater 7y ago
Why not use binary data? A typed array should work (unsure of the exact APIs, though).
- helpmepropose 7y agoHey underwater, I just wanted to follow up and say thanks. Without doing any other optimization, it seems that switching the ajax request from JSON to a big TypedArray changed Chrome's parsing time from 18 seconds to instantaneous: https://helpmepropose.live https://helpmepropose.live Thanks again!
- helpmepropose 7y agoThat's a good idea, thanks! I'd previously thought typed arrays had to be initialized with data that's already in memory, but it looks like I was wrong there. This page is giving some hints that it can be done: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#Properties https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequ...