Closed Bug 46802 Opened 24 years ago Closed 24 years ago

startup load of nsprefm.dll could be avoided

Categories

(Core Graveyard :: Profile: Migration, defect, P4)

x86
Windows 2000
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bratell, Assigned: dbragg)

References

Details

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

nsprefsm.dll is loaded at each start but normally doesn't do anything. Right now 
the whole dll is loaded because 
nsPrefConverter::ConvertPrefsToUTF8IfNecessary(void) is called and (except for 
the first time run) the only thing it does is the the following:

  NS_WITH_SERVICE(nsIPref, prefs, kPrefServiceCID, &rv);
  PRBool prefs_converted = PR_FALSE;
  prefs->GetBoolPref("prefs.converted-to-utf8",&prefs_converted);
  if (prefs_converted) return NS_OK;

Couldn't that code be moved outside the dll? Maybe to somewhere near 
http://lxr.mozilla.org/seamonkey/source/profile/src/nsProfile.cpp#408
.
I think the dll gets unloaded when used, I hope I'm right, but fixing this would 
at least decrease startup time.
Blocks: 29249
Keywords: nsbeta3, perf
Summary: startup load of nsprefsm.dll could be avoided → startup load of nsprefm.dll could be avoided
Status: NEW → ASSIGNED
Whiteboard: [nsbeta3-]
This is also a footprint issue, we do *not* unload component libraries once 
loaded AFAIK. I'll take this, the suggested fix is right on and simple, no 
reason not to.
Assignee: dbragg → dveditz
Status: ASSIGNED → NEW
Keywords: footprint
Whiteboard: [nsbeta3-] → [nsbeta3+]
Reassign to dbragg.
Assignee: dveditz → dbragg
Priority: P3 → P4
Accepting
Status: NEW → ASSIGNED
Fixed.  Test for need to update to UTF8 now in nsProfile.cpp so nsprefm.dll or 
.so or .shlb, whatever will only be loaded if the prefs need to be changed to 
utf8.
Oops, Didn't mark fixed.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
verified code fix
Status: RESOLVED → VERIFIED
It works also. I tested with a current CVS debug build on Windows 2000 and 
nsprefm.dll is no longer loaded.
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.