Closed Bug 128335 Opened 23 years ago Closed 22 years ago

GetFactory in static build does linear search with string compares

Categories

(Core :: XPCOM, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla1.0

People

(Reporter: sfraser_bugs, Assigned: shaver)

References

()

Details

(Keywords: perf)

Attachments

(1 file)

In the static build, which uses nsStaticComponentLoader, doing a create instance 
by contract ID calls GetInfoFor(), which uses linear search through the 
registered modules doing a string compare on each. This will be slow!
Keywords: perf
This is waterson's baby.
Assignee: dougt → waterson
waterson's away till April -- if this needs attention sooner, pls. reassign.

/be
The static build rules, but this is a stain on its cold-start perf. 
Pre-approving for mozilla1.0.

/be
Keywords: mozilla1.0+
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla1.0
shaver says he'll fix it.
Assignee: waterson → shaver
Status: ASSIGNED → NEW
Seems to work for me, but it's late, so I'll look again in the A.M.
Comment on attachment 80344 [details] [diff] [review]
Use a dhash, mk 1.

sr=waterson
Attachment #80344 - Flags: superreview+
Comment on attachment 80344 [details] [diff] [review]
Use a dhash, mk 1.

nit

+    if (!mInfoHash.ops)	 // creation failed in init, why are we here?
+	 return NS_ERROR_NOT_INITIALIZED;

wanna add an assertion?

r=dougt
Attachment #80344 - Flags: review+
Landed on the trunk.  dougt: I added an NS_WARNING there, thanks for the idea.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: