-
Notifications
You must be signed in to change notification settings - Fork 359
Add include moc_*.cpp #1171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ulmus-scott
wants to merge
16
commits into
MythTV:master
Choose a base branch
from
ulmus-scott:moc
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add include moc_*.cpp #1171
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
which the CMake build does and the check for vaCreateSurfaces() effectively already did.
<va/va_glx.h> also includes X11 headers via <GL/glx.h>.
so they can be disabled separately. Gentoo removed the GLX backend for libva to simplify packaging. <GL/glx.h> is included by <va/va_glx.h>, so it doesn't need to be checked separately.
Add an additional message_XXX function for printing a path [in brackets].
and move MythNVControl into mythnvcontrol.cpp, hiding the X11 includes from the header file.
and make LOG message selection easier to read.
X11 defines many annoying global declarations, typedefs, and macros. Unfortunately, the Display typedef cannot be forward declared in mythxdisplay.h. `using Window = unsigned long` would work, however.
This improves compiler analysis since the entire class definition is in one compilation unit and decreases compile and link times due to fewer object files being linked together. In addition, for CMake this greatly speeds up incremental compilation since this avoids the use of mocs_compilation.cpp where every moc_*.cpp file was included. Build times with a cleared ccache (no LTO): Build Test Build plugins qmake (before): 219.458 39.463 22.682 qmake (after) : 202.001 37.023 17.981 CMake (before): 246.225 24.18 n/a CMake (after) : 241.419 24.122 n/a Build times after git clean -xdf (filled ccache) (no LTO): Build Test Build plugins qmake (before): 21.777 27.249 1.334 qmake (after) : 21.411 26.920 1.248 CMake (before): 54.205 24.08 n/a CMake (after) : 53.860 24.148 n/a A full rebuild with qmake is about 10% faster. A full rebuild with CMake is about 2% faster. After git clean -xdf, this is about 1-2% faster. libmythprotoserver/socketrequesthandler.h is header only, so mythsocketmanager.cpp is as good a place as any since it already uses SocketRequestHandler. mythfrontend/settingshelper.h and most of the files in mythfrontend/servicecontracts/ and mythbackend/servicesv2/ are header only, so there is no good place to include each moc_*.cpp file. A few files in mythcommflag, mythtv-setup/expertsettingseditor.h, libmythbase/mythsystemprivate.h, libmythtv/channelscan/paneatsc.h, and libmythtv/channelscan/panedvbutilsimport.h are also header only. I used the script from https://raymii.org/s/blog/Qt_add_moc_includes_to_speed_up_compilation.html and manually touched it up. The script does not account for Q_OBJECT in a .cpp file. Some further discussion of this, with some other scripts linked, is here: https://planet.kde.org/friedrich-kossebau-2023-06-28-include-also-moc-files-of-headers/
Only the backend recording extender test uses SQLite if available.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This improves compiler analysis since the entire class definition
is in one compilation unit and decreases compile and link times
due to fewer object files being linked together. In addition,
for CMake this greatly speeds up incremental compilation since
this avoids the use of mocs_compilation.cpp where every moc_*.cpp
file was included.
I first had to fix header guards and hide the troublesome X11 headers. This includes #1151 since that moved some of the X11 including headers.
With ccache, this was 1-2% faster. With ccache cleared, qmake was about 10% faster.
Checklist