Closed Bug 103912 Opened 23 years ago Closed 22 years ago

nsChromeRegistry::LoadInstallDataSource() is 2.5% of main1()

Categories

(Core Graveyard :: RDF, defect, P2)

x86
Windows 2000
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.0

People

(Reporter: dp, Assigned: hyatt)

References

Details

(Keywords: memory-footprint, perf, Whiteboard: [adt3])

Attachments

(2 files)

Timing analysis on this:

main1
				1	0	3,279ms	mozilla.exe
nsChromeRegistry::CheckForNewChrome
1
0ms
63ms
chrome.dll
It doesn't look like CheckForNewChrome() is doing anything. It is taking about
2% of main1() on startp

Can we remove it ?
Blocks: 7251
Keywords: perf
No, it can't be removed.  This is the function that does chrome registration.
Ah! So if I look at its descendents, almost all of its time is consumed by:

LoadInstallDataSource()
100%
1
63ms

And that inturn is 15 LoadDataSource() calls. Can we merge those individual
files statically instead of loading them and merging them on the fly ?

If you dont see any optimizations here, feel free to INVALID / WONTFIX the bug.
I don't think merging them would buy us much of anything.  A better optimization
IMHO would be to look into why loading RDF/XML files takes so long.
Changing summary approriately
Summary: nsChromeRegistry::CheckForNewChrome() Needs to be removed → nsChromeRegistry::LoadInstallDataSource() is 2% of main1()
Taking over bug. We agreed to look at the parser first to see if we can improve
its performance. We will revisit this next.
Assignee: hyatt → dp
Summary: nsChromeRegistry::LoadInstallDataSource() is 2% of main1() → nsChromeRegistry::LoadInstallDataSource() is 2.5% of main1()
Target Milestone: --- → mozilla0.9.7
In my debug build, the time spent in calls to LoadDataSource() is dominated by
loading the first five datasources from dist/bin/chrome.  Strangely enough, the
time spent on these doesn't seem to correspond to the size/complexity of the RDF
file -- user-skins.rdf consistently takes twice as long as all-skins.rdf,
despite being a good deal simpler.

Hmm.
Priority: -- → P2
Status: NEW → ASSIGNED
Out of the 47 calls to rdf blocking parser, these are the 11 files that exist:

 455   /export/dp/trunk/mozilla/dist/bin/chrome/user-skins.rdf
5669   /export/dp/trunk/mozilla/dist/bin/chrome/all-skins.rdf
1223   /export/dp/trunk/mozilla/dist/bin/chrome/user-locales.rdf
8194   /export/dp/trunk/mozilla/dist/bin/chrome/all-locales.rdf
8870   /export/dp/trunk/mozilla/dist/bin/chrome/all-packages.rdf
 525  
/export/dp/trunk/mozilla/dist/bin/chrome/overlayinfo/navigator/content/overlays.rdf
1108  
/export/dp/trunk/mozilla/dist/bin/chrome/overlayinfo/messenger/content/overlays.rdf
 291  
/export/dp/trunk/mozilla/dist/bin/chrome/overlayinfo/editor/content/overlays.rdf
2158  
/export/dp/trunk/mozilla/dist/bin/chrome/overlayinfo/communicator/content/overlays.rdf
5937   /home/dp/.mozilla/Default%20User/bxr32616.slt/localstore.rdf

Chase, the timing for user skins includes load of liburiloader.so hence the
bloate d time.
Depends on: 109488
Depends on: 109590
Target Milestone: mozilla0.9.7 → mozilla0.9.8
This can probably get a bit smaller if we peel out some of the lesser-accessed
RDF into a separate RDF file that is only loaded when showing the prefs UI.
Target Milestone: mozilla0.9.8 → mozilla0.9.9
Hyatt already did a lot of improvement by merging the rdf files into one. Need
to measure one last time to make sure and close this out.
Target Milestone: mozilla0.9.9 → mozilla1.0
Keywords: nsbeta1
I see footprint wins here. The data sources that arent needed actually create a
a hashtable and 3 arenas each. I almost have a patch that will fix this.
Keywords: nsbeta1footprint, nsbeta1+
I had it stat and prevent the creation of datasources. Hyatt has a better way do
to this: at chrome registration time note down if there exists stylesheets.rdf
and overlays.rdf

Hyatt if you already have a bug, close this as duped and ensure you have that
one nominated (my vote).
Assignee: dp → hyatt
Status: ASSIGNED → NEW
Please update this bug with an [adt1] - [adt3] impact rating (or take it off the
list if it doesn't even rate adt3.)  Thanks!
Whiteboard: [adt3]
Attachment #77539 - Flags: review+
Comment on attachment 77539 [details] [diff] [review]
Patch to annotate and avoid creating DS when they don't exist.

r=bryner
Attachment #77539 - Flags: superreview+
Comment on attachment 77539 [details] [diff] [review]
Patch to annotate and avoid creating DS when they don't exist.

sr=blake
Comment on attachment 77539 [details] [diff] [review]
Patch to annotate and avoid creating DS when they don't exist.

sr=blake
Comment on attachment 77539 [details] [diff] [review]
Patch to annotate and avoid creating DS when they don't exist.

a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #77539 - Flags: approval+
Fixed.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
verified
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: