Closed Bug 1389848 Opened 7 years ago Closed 7 years ago

isServiceInstantiatedByContractID should return false rather than throw when component isn't instantiated

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Performance Impact low
Tracking Status
firefox57 --- fixed

People

(Reporter: kmag, Assigned: kmag)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We spend several ms at startup constructing exception objects for startupRecorder.js ahen it checks for uninstantiated services. This isn't an issue for release builds, but it does add extra overhead and GC pressure for nightly talos runs, and ordinary nightly users, that we wouldn't see on release. Which means it gives us a bad picture of what's going on for normal users.
Comment on attachment 8896658 [details] Bug 1389848: Make isServiceInstantiated*() return false rather than throw for uninstantiated services. https://reviewboard.mozilla.org/r/167952/#review173466
Attachment #8896658 - Flags: review?(ehsan) → review+
Whiteboard: [qf] → [qf:p3]
Pushed by maglione.k@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/e19453003208 Make isServiceInstantiated*() return false rather than throw for uninstantiated services. r=ehsan
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
If we wanted to completely avoid the startupRecorder overhead related to listing services, we should add a native method returning the list of already instantiated services, instead of having JS code iterating through all the registered contract ids. I didn't bother doing it at the time because it was nightly-only code. But thanks for improving it :-)
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: