Closed Bug 128335 Opened 18 years ago Closed 18 years ago
Factory in static build does linear search with string compares
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!
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
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: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.