Closed Bug 395256 Opened 17 years ago Closed 17 years ago

Make nsJSID/IID/CID objects .equals method slightly faster

Categories

(Core :: XPConnect, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: benjamin, Assigned: benjamin)

References

Details

Attachments

(1 file)

This patch changes the signature of the (noscript, mainly internal) nsIJSID.equals method to take a nsIDRef instead of a nsIJSID... I suspect that this will improve performance in a few cases. There are some additional optimizations that could be made, such as keeping the IID on nsJSIID instead of forwarding requests to nsIInterfaceInfo... or making nsIJSID.id a "shared" property, except I don't think that will work for threadsafety reasons.
Attachment #279952 - Flags: review?(mrbkap)
Attachment #279952 - Flags: review?(mrbkap) → review+
Attachment #279952 - Flags: superreview?(jst)
Attachment #279952 - Flags: approval1.9?
Comment on attachment 279952 [details] [diff] [review]
Make JSIDs faster, probably, rev. 1

This will be approved for landing in M8, during the freeze, only once jst has SR'd.
Attachment #279952 - Flags: superreview?(jst)
Attachment #279952 - Flags: superreview+
Attachment #279952 - Flags: approval1.9?
Attachment #279952 - Flags: approval1.9+
Comment on attachment 279952 [details] [diff] [review]
Make JSIDs faster, probably, rev. 1

Oops, re-requesting approval as I'm not supposed to do them any more :)
Attachment #279952 - Flags: approval1.9+ → approval1.9?
Attachment #279952 - Flags: approval1.9? → approval1.9+
First patch landed on trunk. Didn't help much, so I'm going to try a patch to avoid the alloc/release.
Depends on: 395467
This appears to have cause a regression for at least one extension in bug 395256. Given the closeness to M8 I would suggest we might want to back this out a.s.a.p. unless we have an understanding of what is going on.
I backed out the first patch because of the regression.
mozilla/js/src/xpconnect/idl/xpcjsid.idl 	1.22
mozilla/js/src/xpconnect/src/xpcjsid.cpp 	1.72
Comment on attachment 279952 [details] [diff] [review]
Make JSIDs faster, probably, rev. 1

>Index: js/src/xpconnect/idl/xpcjsid.idl
>===================================================================
> [scriptable, uuid(C86AE131-D101-11d2-9841-006008962422)]
> interface nsIJSID : nsISupports
...
>-    boolean equals(in nsIJSID other);
>+    boolean equals(in nsIDRef other);

Why was the uuid not updated for this change?
Attachment #279952 - Flags: approval1.9+
Going to mark this WONTFIX... it didn't really improve perf when it landed, and I'm not sure this is a critical codepath for anything right now.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: