Closed Bug 62755 Opened 24 years ago Closed 21 years ago

prefs files need to be partitioned / factored

Categories

(Core :: Preferences: Backend, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 224578

People

(Reporter: jud, Assigned: timeless)

References

Details

(Keywords: embed, topembed-, Whiteboard: [NEEDINFO] [NEEDHELP FOR MAC])

Attachments

(2 files)

Currently an embedding app needs to include all.js, initprefs.js, and 
[OS]pref.js. all.js in particular contains many preferences that don't pertain 
to embedding scenarios. For example, current embedding clients don't need 
mailnews preferences.

Should modules using/needing prefs provide their own prefs file and export it to 
a prefs directory (part of the build process would be to cobble them all 
together at the end)?
yes, we need to move prefs out of modules/libpref/src/init and into their
respective modules. all.js can be broken up into a few files as well.
cc mcafee since he's often interested in this stuff
Status: NEW → ASSIGNED
Keywords: embed
Target Milestone: --- → mozilla1.0
I'm nominating this for 0.8. Until this is fixed, we'll have to push every pref
under the sun around to embeddors. On top of confusion, each pref yields
overhead in the pref subsystem.
Keywords: mozilla0.8
i'm working on this, but i'll need to ignore bugmail to finish. and i'm only 
factoring wallet atm.
OS: Windows 2000 → All
Hardware: PC → All
over to timeless (_THE_ man!). please note the 0.8 nomination.
Assignee: alecf → timeless
Status: ASSIGNED → NEW
adding jag to cc list.

We haven't really spent time thinking about how to paritition this stuff. But
some toplevel modules I'd seperately package would be I'd make would be.

JS/CAPS
necko
xpfe*
mail/news
i18n
l10n
layout
ok. time to reduce my bugmail intake.
Status: NEW → ASSIGNED
Target Milestone: mozilla1.0 → mozilla0.8
from a QA perspective, where would/should these pref files end up? ie, would
they be moved out of default/prefs/ and if so, where? thx!
I suspect they'll all still wind up in default/prefs, it's just that we'll have
several files rather than just a few. That way, if we're not shipping component
foo, foo's prefs don't have to be shipped either.
Note that loading in the prefs files is a significant proportion of startup time. 
Please try and keep the number and size of the prefs files to a minimum.
good point. hmmm. we need to somehow consolodate all the files after a full
build, into a single (or fewer) prefs files. Thoughts?
Blocks: 64846
Attached patch patchSplinter Review
excellent! r=valeski. Are we already cobbling .js files together at build time?
Umm...wasn't one of the main goals of 33115 to keep pref loading to a minimum?  
I'd rather this not go in until we work out the consolidation.

(btw, +    $(MAKE_INSTALL) .\init\siderbar.js $(DIST)\bin\defaults\pref -- 
siderbar?)
I think we need some performance numbers. First - for SeaMonkey which reads the
most prefs - is there a performance hit for interpreting a number of smaller
prefs files instead of all.js? I doubt it, but let's find out. Unless there is a
noticable hit we should do this because splitting the files makes it easier for
an embedding app to build a dist. 
33115 is about removing obsolete prefs entries.

There will certainly be more overhead w/ new file opening/reading/closing going 
on. I've filed http://bugzilla.mozilla.org/show_bug.cgi?id=66877 to address the 
consolodation of prefs files, post build.

This bug is seperate and stands on it's own. Let's move forward w/ a sr= on this 
one and get it in.
sr=alecf

at some point (or as part of this bug) we should be moving the individual .js
files into their respective module's directories

i.e. modules/libpref/src/init/mailnews.js should probably end up in
mailnews/base/prefs/mailnews.js or something similar.
let's move them out here. timeless, can you make that last revision?
see bug 66877, opening of pref files is expensive.?
Something to think about in terms of speeding up startup.
I applied Timeless' patches and crashed at startup in necko.dll

NS_IMETHODIMP
nsFileIO::GetName(char* *aName)
{
   return mFile->GetPath(aName);
}

Depends on: 66877
current plans for new locations:

all.js
browser.js => xpfe/browser
necko.js => netwerk
sidebar.js => xpfe/components/sidebar
i18n.js => intl
wallet.js => extensions/wallet
mailnews.js => mailnews
editor.js => editor
config.js

ok, the things that are left are [in all.js] of the following types:
images font general signed image clipboard middlemouse css mousewheel profile 
converter silentdownload security advanced prefs nglayout ui imageblocker 
javascript autoupdate

remove [4.x only]:
pref("autoupdate.enabled",              true);
silentdownload.*

belongs in maybe ui.js:
font.*
css.*
middlemouse.*
mousewheel.*

what do people want to do with the others?

as stephend found, my patch can't be committed until bug 66877 is fixed.
cc module people, please raise your objections here ASAP.  If there are none, 
then I'll make the changes as soon as bug 66877 lands.
Whiteboard: [NEEDINFO]
I see that you've put the cookies prefs into necko.js.  But the cookie module is 
in extensions/cookie and supposedly could be left out of an installation.  But 
in that case the cookie prefs would still be present.
I think cookies is an edge case. two options:
1. cookies gets it's own cookies.js file
2. we eat the overhead in the *really* off chance that cookies and necko get 
seperated.
filed bug 67281 for cookies.
Depends on: 67281
<nitpick> Consider renaming necko.js to network.js. Necko was a code 
name and network is more descriptive.</nitpick>
yes, we should do network.js
yes done, any other things i need to do?  maybe i should work on bug 66877.
Blocks: 56243
No longer blocks: 56243
Summary: prefs files need to be patitioned / factored → prefs files need to be partitioned / factored
Target Milestone: mozilla0.8 → mozilla0.9
Keywords: mozilla0.8.1
Keywords: mozilla0.8
Are you still shooting for 0.9 on this?  Do you think that you'll have the two
dependencies fixed in the next day or two?  If so please email
drivers@mozilla.org with a status on you progress. If not please retarget
against a later Milestone. Thanks.
slipping.  Beard/JJ, I need help on the mac side. When can I get it?
Keywords: mozilla0.8.1
Target Milestone: mozilla0.9 → mozilla0.9.1
Whiteboard: [NEEDINFO] → [NEEDINFO] [NEEDHELP FOR MAC]
beard's on vacation, jj soon to be swamped with 0.9.1 release work.
this kind of change would be better early in a milestone, right?
I'm going to unset the target milestone until we get a good
estimate on all the platforms...  this sorta looks like a landing
plan thingy, right?

if we go with separate files we need impact on startup perf numbers.
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Target Milestone: mozilla0.9.2 → mozilla0.9.3
Target Milestone: mozilla0.9.3 → mozilla0.9.4
this one seems to be sliding.. lets try to give it a realistic milestone. 
thanks - chofmann
Target Milestone: mozilla0.9.4 → ---
Keywords: topembed
minusing this bug as per edt triage, but we'll take out the minus from topembed-
if the fix is available in the next few weeks.  
Keywords: topembedtopembed-
EDT topembed triage: topembed+ again since this should be a disk footprint win.
 Josh, please reassign if you need help on this one.
Keywords: topembed-topembed+
*** Bug 158594 has been marked as a duplicate of this bug. ***
topembed minus for the time being per EDT discussion.  

Can we get an estimate of the footprint / performance win?
Keywords: topembed+topembed-
Blocks: 207317
Blocks: 207315
No longer blocks: 207315, 207317
Blocks: 207315
This was accomplished by bug 224578:
modules/libpref/src/init/editor.js -> editor/ui/composer.js
modules/libpref/src/init/mailnews.js -> mailnews/mailnews.js
and more...

*** This bug has been marked as a duplicate of 224578 ***
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
No longer blocks: 207315
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: