The profile code opens and closes the registry 20x at startup. The registry is refcounted so if you make sure some outer thing keeps it open you may not have to change much code to fix this. When buffered i/o is added (soon) opening the registry will become even more expensive.
Assignee: selmer → racham
Priority: P3 → P2
Target Milestone: M11
I can open the registry in the startup and close it down again in the shutdown. That should let me remove all those additional open()s in the other sub-routines. Changing status to assigned.
Adding to the list of startup performance bugs.
Putting on [Perf] radar.
*** Bug 14002 has been marked as a duplicate of this bug. ***
We need to cache the curr profile dir value in the file locator service. All other components use file locator service to get this value. Also, at the start up, registry is opened and closed many times. Yesterday, Dan Vetidz has added an API to nsRegistry which tells whether a registry is opened or not. Using that API, we can cut down on the number of opens and closes at the startup.
nsIRegistry::IsOpen() was checked in last night -- use away!
Getting nsRegistry as a SERVICE is the wrong thing to do. Because nsRegistry keeps a handle to the open registry file we need a different instance of nsRegistry for each open registry. Create it as a component! Then we won't conflict with other users. Apparently this was a major flaw in the IsOpen() call I added -- you know *A* registry is open, but you don't know it's the one you want if you're using the registry service. If you use the component manager to create a new instance this won't be a problem.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Thanks to Dan and Steve. Profile registry is opened as a component not as a service. Used isOpen() API to minimize the number of I/O operations on mozregistry at startup. Registry now is opened in the Startup and is closed at the end of Startup operations.
Bhuvan, Is there a test case I can use to verify this? Grace
Grace, Do you know anyone who runs purify in QA ? Then we can measure the number of times registry is being accessed.
Moving all Profile Manager bugs to new Profile Manager Backend component. Profile Manager component to be deleted.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.