Split StaticPrefs.h into multiple files
Categories
(Core :: Preferences: Backend, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
Details
Attachments
(4 files)
StaticPrefs.h is included almost everywhere, and it also changes frequently. As a result, it triggers a lot of recompilation for people.
I plan to split the file into pieces, where all the prefs with the same first segment go in the same file. E.g. all the "gfx.*" prefs would go into StaticPrefs_gfx.h. Most files will only need to import one or two of these smaller headers, which should greatly reduce the amount of recompilation triggered by changes.
I was going to do this in a single bug (bug 1560530) but I have now decided to split it up across multiple bugs.
![]() |
Assignee | |
Updated•6 years ago
|
![]() |
Assignee | |
Comment 1•6 years ago
|
||
Another change of plan: now that static prefs are in a YAML file, splitting the resulting headers is easier, because they are generated code rather than checked-in code. So the remaining parts can be done in this single bug.
![]() |
Assignee | |
Comment 2•6 years ago
|
||
These files exist because they were the proof-of-concept first step for
splitting the static prefs header files. Now that those header files can be
generated from a script, we need to move the accessibility.*
prefs into the
YAML file.
![]() |
Assignee | |
Comment 3•6 years ago
|
||
StaticPrefs.h will be removed two commits from now, so update these comments.
The patch removes the comment above SetUsesContainerScrolling() because it's
wrong -- that function doesn't use static prefs at all -- and make it
inlinable.
Depends on D39132
![]() |
Assignee | |
Comment 4•6 years ago
|
||
Instead of generating a single init/StaticPrefList.h
, we now generate:
init/StaticPrefListAll.h
;StaticPrefsAll.h
;- one
init/StaticPrefList_*.h
file for each pref group; - one
StaticPrefs_*.h
file for each pref group.
StaticPrefs.h
still exists -- it's equivalent to all the StaticPrefs_*.h
files combined -- so no .cpp
files are changed by this commit. The next
commit will remove that file and replace inclusions of it with inclusions of
the new files.
The patch also adds checking of the type of the do_not_use_directly
field.
Depends on D39133
![]() |
Assignee | |
Comment 5•6 years ago
|
||
This requires replacing inclusions of it with inclusions of more specific prefs
files.
The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in Codegen.py
because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.
Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.
Depends on D39134
Comment 7•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c31527d8984e
https://hg.mozilla.org/mozilla-central/rev/f293ea1956d9
Updated•6 years ago
|
Comment 10•6 years ago
|
||
bugherder |
Description
•