Closed Bug 2025271 Opened 7 months ago Closed 6 months ago

Simplify DOMString.

Categories

(Core :: DOM: Bindings (WebIDL), enhancement)

enhancement

Tracking

()

RESOLVED FIXED
151 Branch
Tracking Status
firefox151 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

(Blocks 1 open bug)

Details

(Keywords: perf-alert)

Attachments

(2 external files)

Split off from bug 2023628 since it's technically different. That way we can also land it separately.

Blocks: 2025279
Type: defect → enhancement

Make DOMString a regular nsAutoTString with some special methods for
performance in some hot getters. For that, we need to change a bit
nsTString:

  • Support for unowned buffers: Owned buffers now are represented by
    STRINGBUFFER|OWNED flags, rather than REFCOUNTED.

  • Inlining of the destructor: It showed up in profiles, it's also just
    a few instructions, so probably worth it. We could OOL the owned path
    I guess, if we wanted to.

  • Inlinling and reordering of NonVoidStringToJsval. Old code had
    special DOMString path inline with [buffer, literal, copy] paths,
    then out of line code with [literal, buffer, copy]. Instead,
    consolidate everything in a [buffer, literal, copy] inline path.
    Do the same for UTF8/Latin1 strings too for consistency.

Match GetAsJSString which just uses mData, this code is probably
leftover from bug 1484990.

Blocks: 1837063
Pushed by ealvarez@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/fe182cca644b https://hg.mozilla.org/integration/autoland/rev/5ad560d07305 Simplify DOMString. r=smaug,nika,extension-reviewers,core-sessionstore-reviewers,dom-worker-reviewers,robwu,asuth
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 151 Branch

This increased the installer size on Windows-non-shippable by 93KB.

(In reply to Pulsebot from comment #4)

Pushed by ealvarez@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/fe182cca644b
https://hg.mozilla.org/integration/autoland/rev/5ad560d07305
Simplify DOMString.
r=smaug,nika,extension-reviewers,core-sessionstore-reviewers,dom-worker-
reviewers,robwu,asuth

Perfherder has detected a build_metrics performance change from push 5ad560d07305449e5126757d609577ba025f07c8.

No action is required from the author; this comment is provided for informational purposes only.

Improvement Test Platform Options Absolute values [old vs new]
2% build times windows2012-64-shippable nightly taskcluster-projects/970387039909/machineTypes/c3d-standard-60-lssd 3,228.95 -> 3,161.25

Need Help or Information?

If you have any questions, please reach out to afinder@mozilla.com. Alternatively, you can find help on Slack by joining #perf-help, and on Matrix you can find help by joining #perftest.

Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.

Keywords: perf-alert
QA Whiteboard: [qa-triage-done-c152/b151]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: