Closed
Bug 84871
Opened 23 years ago
Closed 23 years ago
Half of Linux cold start is spent stat()ing components files
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: rogc, Assigned: rayw)
Details
I'm playing around with the static build on branch STATIC_BUILD_20010523_BRANCH. By playing around with code reordering and stripping binaries, I've gotten startup time down to around 18 seconds on reboot. It turns out according to strace that about half of that time is spent calling stat() 4 times on each file in dist/bin/components. Sure enough, these commands: ls -lL mozilla/dist/bin/components ls -lL mozilla/dist/bin/components ls -lL mozilla/dist/bin/components ls -lL mozilla/dist/bin/components Take about 9 seconds to execute on my 1GHz PIII running RedHat 7.0 (+ new compilers). Of course almost all of that time comes from the first run of "ls"; after that all the info is in the disk cache. This is all coming from a call to NS_SetupRegistry_1 in xpfe/bootstrap/nsAppRunner.cpp I sense an opportunity for performance improvement :-) Please let me know if you'd like some help. Thanks! -Roger
Reporter | ||
Comment 1•23 years ago
|
||
It turns out that almost all of this time is spent resolving symlinks. If I copy all the files to a directory it takes very little time to stat() all those files. We still spend about 3.5 seconds in NS_SetupRegistry_1(), but it's doing other stuff now. Marking this invalid. -Roger
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•