Closed Bug 80366 Opened 23 years ago Closed 7 years ago

Investigate lazy initialization of XPCNativeInterface members

Categories

(Core :: XPConnect, enhancement, P3)

enhancement

Tracking

()

RESOLVED INCOMPLETE
Future

People

(Reporter: jband_mozilla, Assigned: dbradley)

Details

See the comment in XPCNativeInterface::NewInstance: http://lxr.mozilla.org/seamonkey/search?string=XXX+Investigate+lazy+init Some profiling and experimentation might show whether or not it is worth trying to avoid doing the eager work done in this code.
Status: NEW → ASSIGNED
What's the potential savings vs. complexity of this?
Priority: -- → P3
Target Milestone: --- → Future
Moving up for performance/footprint focus
Target Milestone: Future → mozilla0.9.7
Priority: P3 → P2
The biggest offender is JS_InternString. It takes about 40 to 60% of the function time. Over startup and browsing two web pages this translates into about 15 milliseconds. What I didn't take time to measure how many of these we'd save converting. In order to call JS_InternString later, we'd need a JSContext and GetName's use in FindMember creates a problem, as there is no JSContext. I think at some point it may be worth revisiting. But the impact to the interfaces to get a JSContext to all uses of this function has a fair ripple effect.
Priority: P2 → P3
Target Milestone: mozilla0.9.7 → Future
QA Contact: pschwartau → xpconnect
Somebody can file a new bug if this string interning from XPCNativeInterface::NewInstance() shows up in profiles.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.