Start splitting StaticPrefs.h into multiple files
Categories
(Core :: Preferences: Backend, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
Details
Attachments
(1 file, 1 obsolete file)
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.
![]() |
Assignee | |
Comment 1•6 years ago
|
||
Nathan gave me the nice idea of changing StaticPrefs
from a class to a namespace. This is relevant because a C++ class must be declared in a single file, but the contents of a namespace can be spread across multiple files. And because class qualification and namespace qualification both use ::
in C++, the use points won't need to change.
![]() |
Assignee | |
Comment 2•6 years ago
|
||
Updated•6 years ago
|
![]() |
Assignee | |
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
![]() |
Assignee | |
Comment 3•6 years ago
|
||
This implements the machinery for the splitting of static prefs headers, and
uses it for a single header. #includes are used in such a way that the amount
of boilerplate for each static prefs header file is minimal.
The next patch will split the remaining prefs into more header files.
![]() |
Assignee | |
Comment 4•6 years ago
|
||
froydnj: I just landed bug 1562331 so I'm now ready to move forward on this bug. Let me know what you think of the first patch! :)
![]() |
Assignee | |
Updated•6 years ago
|
![]() |
Assignee | |
Comment 5•6 years ago
|
||
I was going to do this all in a single bug, but I will now do it across multiple bugs. Bug 1563139 is the tracking bug.
Comment 7•6 years ago
|
||
bugherder |
Description
•