-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Move QgsRasterMinMaxOrigin enums to Qgis, promote to enum class #59644
Conversation
🪟 Windows buildsDownload Windows builds of this PR for testing. 🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. |
This looks good to me. |
This has perhaps be discussed before, but shouldn't we feel concerned that qgis.h has become a 6700 lines monster that gets parsed again and again for all QGIS .cpp files ... ? Perhaps that's neglectable compared to other mandatory Qt headers ? |
Is it that problematic though? The bulk of the header is documentation or trivial enum declarations. The intention here was to move enums (which are rarely changed) to a place that doesn't change much, so that we can change more headers to forward declare and ultimately make recompilation quicker. It's certainly much faster nowadays to recompile after a change to eg QgsMapLayer, where a few years ago this would have triggered an almost-full recompilation. We're still in an in-between state though, because qgis.h ends up being changed semi regularly as we slowly move more enums into it. Over time this should slow (and eventually stop), and then it'll only be very rarely touched.
QNamespace is around 2000, qstring 2000, qvariant 1000, qglobal around 1000. It certainly adds up... 🤪 |
doing some homework, creating a test program that just includes qgis.h, on ubuntu 22.04:
on fedora:rawhide:
This isn't due to the content we've added, which accounts for about 200 ms of the total time. The main culprit is just including QMetaEnum But with precompiled headers: on ubuntu 22.04:
and on fedora:rawhide:
So there would be some value in having a precompiler header for qgis.h |
Interesting! So what's your conclusion? Should we continue these cleanups for now? |
Yes. We have other options to optimize build times |
No description provided.