Closed Bug 1504034 Opened Last year Closed 11 months ago

reduce string allocations/copying for the quotes property

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: heycam, Assigned: heycam)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Currently the Rust-side computed value for the quotes property is produced by cloning the strings, which are then copied again into the nsStyleQuoteValues.  We can do better by sharing a single allocation of the list of quote strings in both the Rust and C++ computed value representations.
Blocks: 1504571
Attachment #9021999 - Attachment description: Bug 1504034 - Part 1: Make quotes property reprsentation allocate less → Bug 1504034 - Part 1: Make quotes property representation allocate less
Pushed by cmccormack@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/84a728ecbaa4
Part 1: Make quotes property representation allocate less r=emilio
https://hg.mozilla.org/integration/autoland/rev/2972602ab11d
Part 2: Use Servo to serialize computed quotes values r=emilio
https://hg.mozilla.org/integration/autoland/rev/2e5a8258ba69
Part 3: Store the Rust QuotePair slice as the computed quotes value in Gecko style structs r=emilio
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/07ceb63dcfc8
Followup to address review comments. r=emilio
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/6c4703b12156
followup post-review nit. r=heycam
You need to log in before you can comment on or make changes to this bug.