Closed Bug 639589 Opened 13 years ago Closed 12 years ago

Use js-ctypes extensions for more efficient buffer filling

Categories

(Firefox :: Sync, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: rnewman, Assigned: rnewman)

References

(Depends on 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch fx-sync part. v1Splinter Review
(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!
Attached patch services-central part. v1 (obsolete) — Splinter Review
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
Depends on: 639627
Dead-end.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: