Open Bug 1543746 Opened 6 years ago Updated 2 years ago

Stop reading all files in both $app/defaults/prefs/*.js *and* $app/defaults/preferences/*.js

Categories

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

defect

Tracking

()

Performance Impact low
Tracking Status
firefox68 --- affected

People

(Reporter: Gijs, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: main-thread-io, perf:startup, Whiteboard: [fxperfsize:S])

Attachments

(1 file)

AFAICT:

https://searchfox.org/mozilla-central/rev/69ace9da347adcc4a33c6fa3d8e074759b91068c/modules/libpref/Preferences.cpp#4393,4402,4405

indicates we always load both of these locations for Firefox.

We should stop doing that, there's no real need to have 2 of these, we should settle on one of the two. Mike, do you know which of these are used by enterprises, and how quickly we could switch to just 1 location?

Flags: needinfo?(mozilla)

$gre/defaults/pref/*.js is the one used by enterprises.

But $app/defaults/preferences/*.js is the one used by any app that uses the -app parameter to point to an application.ini (which is still being used).

So I don't think you can safely remove either of these in general.

You could remove the second one for Firefox only.

Flags: needinfo?(mozilla)

(In reply to Mike Kaply [:mkaply] from comment #1)

But $app/defaults/preferences/*.js is the one used by any app that uses the -app parameter to point to an application.ini (which is still being used).

With current versions of Firefox? Is this a distribution thing or a "custom app built on gecko now that xulrunner is gone" thing, or something else?

Flags: needinfo?(mozilla)

With current versions of Firefox?

Yep. You can quickly build a kiosk or locked down Firefox or something similar with current Firefox.

Is this a distribution thing or a "custom app built on gecko now that xulrunner is gone" thing, or something else?

custom app built on gecko now that xulrunner is gone.

You can pretty much take a XUL Runner app and invoke it with -app.

Flags: needinfo?(mozilla)

So I suppose the potential for a win here is knowing whether or not we were invoked with --app, and if not, skipping that second piece of IO.

Whiteboard: [fxperf] → [fxperf:p2]

This should be fairly straightforward... in theory.

Whiteboard: [fxperf:p2] → [fxperf:p2] [fxperfsize:S]

The priority flag is not set for this bug.
:njn, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(n.nethercote)

We don't actually ship anything in browser/defaults/preferences, so we're effectively not reading anything there. As a matter of fact, the browser/defaults directory doesn't even exist. Are you saying that you see the failed attempt of directory opening in profiles? If so... WTF windows?

If you really want to stop reading browser/default/preferences, we might as well go back to bug 1376994 comment 18, because one simple way to not try to read browser/default/preferences is to stop making Firefox a pseudo-xulrunner application. But the questions in bug 1376994 need answering.

Flags: needinfo?(n.nethercote)
Priority: -- → P5
Assignee: nobody → emalysz
Assignee: emalysz → nobody
Performance Impact: --- → P3
Keywords: perfperf:startup
Whiteboard: [fxperf:p2] [fxperfsize:S] → [fxperfsize:S]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: