Use js-ctypes extensions for more efficient buffer filling

RESOLVED WONTFIX

Status

Cloud Services
Firefox Sync: Backend
RESOLVED WONTFIX
7 years ago
5 years ago

People

(Reporter: rnewman, Assigned: rnewman)

Tracking

(Depends on: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

7 years ago
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!
(Assignee)

Comment 1

7 years ago
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 .
(Assignee)

Comment 2

7 years ago
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.
(Assignee)

Comment 3

7 years ago
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
(Assignee)

Updated

7 years ago
Attachment #517505 - Attachment is obsolete: true
(Assignee)

Updated

7 years ago
Depends on: 639627
(Assignee)

Comment 4

5 years ago
Dead-end.
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.