Closed Bug 1363959 Opened 9 years ago Closed 9 years ago

Consider atomizing the strings for the comparisons while resolving a property

Categories

(Core :: XPConnect, defect, P2)

All
Unspecified
defect

Tracking

()

RESOLVED FIXED
mozilla56
Performance Impact low
Tracking Status
firefox56 --- fixed

People

(Reporter: ting, Assigned: ting)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

From the profile of test case attachment 8848224 [details], I see string comparisons: js::StringEqualsAscii() xpc::TryResolvePropertyFromSpecs() [1], mozilla::dom::XrayResolveOwnProperty() [2] strcmp() xpc::XrayTraits::getExpandoObject() [3] I wonder if they worth atomizing, so the string comparison can be a simple pointer check. [1] http://searchfox.org/mozilla-central/rev/d66b9f27d5630a90b2fce4d70d4e9050f43df9b4/js/xpconnect/wrappers/XrayWrapper.cpp#424,448 [2] http://searchfox.org/mozilla-central/rev/d66b9f27d5630a90b2fce4d70d4e9050f43df9b4/dom/bindings/BindingUtils.cpp#1689,1719 [3] http://searchfox.org/mozilla-central/rev/d66b9f27d5630a90b2fce4d70d4e9050f43df9b4/js/xpconnect/wrappers/XrayWrapper.cpp#1152
(In reply to Ting-Yu Chou [:ting] from comment #0) > I wonder if they worth atomizing, so the string comparison can be a simple > pointer check. I meant I wonder if they can be atomized...
Priority: -- → P2
Whiteboard: [qf]
Whiteboard: [qf] → [qf:p1]
(In reply to Ting-Yu Chou [:ting] from comment #0) > strcmp() > xpc::XrayTraits::getExpandoObject() [3] Bug 1363963 ease this one.
Profile shows this doesn't really worth P1 after bug 1363963 landed.
Whiteboard: [qf:p1] → [qf]
Whiteboard: [qf] → [qf:p3]
Attached patch patch v1 — — Splinter Review
Attachment #8887822 - Flags: review?(bobbyholley)
(In reply to Ting-Yu Chou [:ting] from comment #0) > From the profile of test case attachment 8848224 [details], I see string > comparisons: > > js::StringEqualsAscii() > xpc::TryResolvePropertyFromSpecs() [1], > mozilla::dom::XrayResolveOwnProperty() [2] I can still see [2] in VTune, so the patch removes it.
Attachment #8887822 - Flags: review?(bobbyholley) → review+
Pushed by tchou@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/861e1a6afff7 Compare jsid equality instead of string comparison in XrayResolveOwnProperty(). r=bholley
Assignee: nobody → janus926
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Performance Impact: --- → P3
Whiteboard: [qf:p3]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: