Closed Bug 71662 Opened 25 years ago Closed 24 years ago

file open () calls on mozilla startup

Categories

(SeaMonkey :: General, defect)

All
Windows NT
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: cathleennscp, Assigned: cathleennscp)

References

Details

issue from newsgroup posting news://news.mozilla.org/3A8CB264.3000804%40rentec.com from Alan Stange <stange@rentec.com> Hello all, I'm playing with truss on a Solaris box and looking at the number of open() and stat() calls. For the case of starting mozilla with both the browser and mailnews windows coming up and then exiting I see some things like: $ grep strres.js output 22054: open64("/external/stange/mozilla/dist/bin/chrome/toolkit/content/global/strres.j s", O_RDONLY) = 10 22054: stat("/external/stange/mozilla/dist/bin/chrome/toolkit/content/global/strres.js" , 0x00260434) = 0 22054: open64("/external/stange/mozilla/dist/bin/chrome/toolkit/content/global/strres.j s", O_RDONLY) = 10 22054: stat("/external/stange/mozilla/dist/bin/chrome/toolkit/content/global/strres.js" , 0x00B8757C) = 0 22054: open64("/external/stange/mozilla/dist/bin/chrome/toolkit/content/global/strres.j s", O_RDONLY) = 18 22054: stat("/external/stange/mozilla/dist/bin/chrome/toolkit/content/global/strres.js" , 0x00BBDC14) = 0 22054: open64("/external/stange/mozilla/dist/bin/chrome/toolkit/content/global/strres.j s", O_RDONLY) = 18 22054: stat("/external/stange/mozilla/dist/bin/chrome/toolkit/content/global/strres.js" , 0x00BB578C) = 0 22054: open64("/external/stange/mozilla/dist/bin/chrome/toolkit/content/global/strres.j s", O_RDONLY) = 18 Typically, these are paired up. First stat the file, then open it. There is a very nice optimization here to open() the file, if that works, then do an fstat(). The fstat() is essentially free once the open() is done. The idiom of stat() then open() shows up all over Here is the open() output sorted by number of open() calls for N>=2 . You can assume a similar number of stat() calls for each file. 77 open("/dev/zero", O_RDWR) 21 open("/dev/zero", O_RDONLY) 18 open("/home/stange/.mozilla/default/ImapMail/kudu//export//export/home.msf", O_RDWR|O_CREAT|O_TRUNC, 17 open("/home/stange/.mozilla/default/ImapMail/kudu//export/home//export/home/stan ge.msf", O_RDWR|O_CREAT|O_TRUNC, 6 open64("/external/stange/mozilla/dist/bin/chrome/en-US/locale/en-US/global/brand .dtd", O_RDONLY) 6 open("/usr/lib/libatomic.so", O_RDONLY) 5 open64("/external/stange/mozilla/dist/bin/chrome/toolkit/content/global/strres.j s", O_RDONLY) 4 open64("/external/stange/mozilla/dist/bin/chrome/toolkit/content/global/nsJSComp onentManager.js", O_RDONLY) 3 open64("/external/stange/mozilla/dist/bin/components", O_RDONLY|O_NDELAY) 3 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/global/progr essmeter-busy.gif", O_RDONLY) 3 open64("/external/stange/mozilla/dist/bin/chrome/messenger/content/messenger/com mandglue.js", O_RDONLY) 3 open64("/external/stange/mozilla/dist/bin/chrome/en-US/locale/en-US/communicator /contentAreaCommands.dtd", O_RDONLY) 3 open("/usr/openwin/lib/locale/locale.alias", O_RDONLY) 3 open("/usr/openwin/lib/libatomic.so", O_RDONLY) 3 open("/usr/local/ren/prod/lib/libatomic.so", O_RDONLY) 3 open("/usr/local/lib/libatomic.so", O_RDONLY) 3 open("/usr/dt/lib/libatomic.so", O_RDONLY) 3 open("/external/stange/mozilla/dist/bin/libatomic.so", O_RDONLY) 3 open("/external/stange/SUNWspro/lib/libatomic.so", O_RDONLY) 2 open64("/home/stange/.mozilla/default/localstore.rdf", O_WRONLY|O_CREAT|O_TRUNC, 2 open64("/home/stange/.mozilla/default/Cache/Version", O_RDWR) 2 open64("/external/stange/mozilla/dist/bin/plugins", O_RDONLY|O_NDELAY) 2 open64("/external/stange/mozilla/dist/bin/components/xpti.dat", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/toolkit/content/global/toolbarB indings.xml", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/toolkit/content/global/platform GlobalOverlay.xul", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/toolkit/content/global/nsTreeUt ils.js", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/toolkit/content/global/nsTransf erable.js", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/toolkit/content/global/nsJSSupp ortsUtils.js", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/toolkit/content/global/nsDragAn dDrop.js", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/toolkit/content/global/menulist Bindings.xml", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/messenger/un threadcol.gif", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/messenger/ge tmsg-hover.gif", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/global/tree. css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/global/toolb ar.css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/global/textf ield.css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/global/tabco ntrol.css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/global/split ter.css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/global/radio .css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/global/menul ist.css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/global/menub utton.css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/global/menu. css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/global/globa l.css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/global/forma tting.css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/global/color picker.css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/global/check box.css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/global/butto n.css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/global/box.c ss", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/global/animt hrob.gif", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/communicator /toolbar.css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/communicator /sidebar/sidebar.css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/communicator /sidebar/sbtab-dark.gif", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/communicator /prefpanels.css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/communicator /menubutton.css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/communicator /formatting.css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/communicator /communicator.css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/communicator /button.css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/communicator /brand.css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/communicator /box.css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/modern/skin/modern/communicator /bookmarks/bookmarks-tree.css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/messenger/content/messenger/wid getglue.js", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/messenger/content/messenger/msg Mail3PaneWindow.js", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/messenger/content/messenger/msg AccountCentral.js", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/messenger/content/messenger/mai lWindowOverlay.js", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/messenger/content/messenger/mai lWindow.js", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/messenger/content/messenger/mai lCommands.js", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/messenger/content/messenger/acc ountUtils.js", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/en-US/locale/en-US/navigator/na vigator.dtd", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/en-US/locale/en-US/messenger/me ssenger.dtd", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/en-US/locale/en-US/global/textc ontext.dtd", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/en-US/locale/en-US/global/platf ormGlobalOverlay.dtd", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/en-US/locale/en-US/global/intl. css", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/en-US/locale/en-US/communicator /bookmarks/bookmarks.dtd", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/comm/content/communicator/conte ntAreaDD.js", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/comm/content/communicator/conte ntAreaClick.js", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/comm/content/communicator/bookm arks/bookmarksDD-temp.js", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/comm/content/communicator/bookm arks/bookmarks-temp.js", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/comm/content/communicator/bookm arks/bm-panel.xul", O_RDONLY) 2 open64("/external/stange/mozilla/dist/bin/chrome/comm/content/communicator/bookm arks/bm-panel.js", O_RDONLY) 2 open("/usr/openwin/lib/locale/locale.dir", O_RDONLY) 2 open("/home/stange/.mozilla/default/ImapMail/kudu/Trash.msf", O_RDWR|O_CREAT|O_TRUNC, 2 open("/home/stange/.mozilla/default/ImapMail/kudu///export.msf", O_RDWR|O_CREAT|O_TRUNC, 2 open("/home/stange/.mozilla/default/Cache/cache.db", O_RDWR|O_CREAT, 2 open("/home/stange/.mozilla/appreg", O_RDWR)
Blocks: 71861
ed, whats the plan on this? any way to cut down?
I do not see the same thing when running on my system. From what I heard, the top one, /dev/zero, is not really from us, but from the Sun OS. Under Linux or Windows I do not see this. The other issue, which was brought up in one of the performance meetings, is all of the .js scripts opened below do not actually exist in our product as built today (they are all packed into .jar files). I have email the original poster, but have not heard anything yet. Once I do, I will determine if I can recreate this problem. In research this bug, I did not find that there was any real way to change the behavior of the ones that do open the files. The code that opened the files was very disparate. The time used by multiple opens was practically zero vs other performance issues. As it stands now, assuming I do not see any more info or see proof that it will have any effect, I will recommend closing this bug.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
reassigning kandrot perf bugs.
Assignee: kandrot → cathleen
Status: ASSIGNED → NEW
Target Milestone: Future → ---
base on kandrot's previous comment. closing this bug. if problem still exists, please reopen.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.