GetFactory in static build does linear search with string compares

RESOLVED FIXED in mozilla1.0

Status

()

Core
XPCOM
P3
normal
RESOLVED FIXED
17 years ago
7 years ago

People

(Reporter: Simon Fraser, Assigned: shaver)

Tracking

({perf})

Trunk
mozilla1.0
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
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!
(Reporter)

Updated

17 years ago
Keywords: perf

Comment 1

17 years ago
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+

Updated

16 years ago
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla1.0

Comment 4

16 years ago
shaver says he'll fix it.
Assignee: waterson → shaver
Status: ASSIGNED → NEW
Created attachment 80344 [details] [diff] [review]
Use a dhash, mk 1.

Seems to work for me, but it's late, so I'll look again in the A.M.

Comment 6

16 years ago
Comment on attachment 80344 [details] [diff] [review]
Use a dhash, mk 1.

sr=waterson
Attachment #80344 - Flags: superreview+

Comment 7

16 years ago
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
Last Resolved: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.