Created attachment 517503 [details] [diff] [review] fx-sync part. v1 (Follow-on from Bug 638297.) It takes approximately 1msec to perform a test run of byteCompressInts in JS. It takes 0.06msec to allocate a new buffer, with the buffer filling being performed inside js-ctypes' C++ code. The downside of that is that a first sync allocates 700MB of garbage buffers. We would like the best of both worlds. This bug tracks a possible extension of js-ctypes which gets us down to 0.01msec for the run, without the allocations. I fully expect a lot of negative review comments; consider this a straw man!
Created attachment 517505 [details] [diff] [review] services-central part. v1 This adds ArrayType::ByteCompress. Note that this is similar to, but much more specific than, the WriteString proposal in https://wiki.mozilla.org/Jsctypes/api .
N.B., there is some comment stubbetry in attachment 517505 [details] [diff] [review]; we at some point want to push more operations down, so I actually started with readBytes. Please ignore.
Rejigging this bug to depend on one in Core :: js-ctypes.
Summary: Extend js-ctypes for more efficient buffer filling → Use js-ctypes extensions for more efficient buffer filling
Attachment #517505 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.