Closed Bug 29241 Opened 24 years ago Closed 24 years ago

nsID::Parse() called 1200 times and uses PR_sscanf()

Categories

(Core :: XPCOM, defect, P3)

x86
Windows NT
defect

Tracking

()

RESOLVED FIXED
mozilla0.8

People

(Reporter: dp, Assigned: bratell)

References

Details

(Keywords: perf, Whiteboard: fix in hand which reduces startup time by 1.6%)

Attachments

(1 file)

Parsing the ID uses PR_sscanf to parse out the ID. It is called 1200 times on 
startup mostly from nsComponentManagerImpl::PrePopulateRegistry()

Function	%	#calls	Time(millesecs)
------------------------------------------------
nsID::Parse	100	1186	56.38

We dont need to fix this for beta. The gain is very minor.
Blocks: 28964
Status: NEW → ASSIGNED
Target Milestone: M17
Target Milestone: M17 → M20
mass re-assigning to my new bugzilla account
Assignee: scc → scc
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
Updating QA Contact
QA Contact: leger → asa
I have a fix for this which reduces per call time from 25.96 to 0.43 ms. That 
should save 1.6% of startup time which I noticed is prioritized right now. 

(So now I've done my bit. If anyone else also can shave 1% of the startup time 
we will soon have a browser that's started before the user clicked the icon. :-
) ).

I want a review asap so that I can get this in for Mozilla 0.8. Scott? jband?

scc, can I steal the bug?
Keywords: perf
Keywords: mozilla0.8, patch, review
Whiteboard: fix in hand which reduces startup time by 1.6%
sr=jband. 

Looks good to me. Seems to do the right thing for me on NT4. 

FWIW... I just did a quantify run and see that the count of calls to this 
method is 2561 just to startup and quit. This is on a run that does not need to 
do autoreg (where I know the count would be higher). This is twice the count of 
calls it was when I first whined to dp about this.

Thanks!
This looks pretty good.

One nit is inconsistent use of whitespace around operators in this bit:

+    if(the_char>='0' && the_char <= '9') the_int_var -= '0'; \
+    else if(the_char>='a' && the_char <='f') the_int_var -= 'a'-10; \
+    else if(the_char>='A' && the_char <='F') the_int_var -= 'A'-10; \

r=jag.
Yes, it's called 1200 times by PlatformPrePopulateRegistry and 1200 times by
xptiManifest::Read. Maybe the PlatformPrePopulateRegistry
didn't exist before.
Assignee: scc → bratell
Status: ASSIGNED → NEW
Target Milestone: --- → mozilla0.8
Patch checked in with some modification to whitespace.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Or, after reading the first post, maybe the xptiManifest::Read didn't exist before.
Keywords: mozilla0.8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: