--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAB8jPhfv%2Bm%2BnXszY2RWd0USvRizNLYadWoiXKA8pyiLz1B_gRA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAMYvS2c9wuPJUa-KfYGSSPYgBrbbsg6J96zwbKXfTfHSRWh9Ww%40mail.gmail.com.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAAHOzFAjE7ECFh2A6GPjmc77HfHDLWoQjOBRw5tvjfL1HyWUnQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CALNjmMrKi4BaghfzEhpzWAFghgw08HbZmFBJCA-mgLmvjs34dw%40mail.gmail.com.
Unlike the Google style guide, Chromium style prefers forward declarations to #includes where possible. This can reduce compile times and result in fewer files needing recompilation when a header changes.You can and should use forward declarations for most types passed or returned by value, reference, or pointer, or types stored as pointer members or in most STL containers. However, if it would otherwise make sense to use a type as a member by-value, don't convert it to a pointer just to be able to forward-declare the type.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to a topic in the Google Groups "Chromium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/chromium-dev/0ZME4DuE06k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAB8jPhfnzpT0jVFzNX%3DdQ0RLCbpGe6c41meWM1DB%2BegndyrnFg%40mail.gmail.com.
Keep #include reductions in mind when writing and reviewing code also. Any #include that you add to a header file may end up being pulled in to hundreds or thousands of translation units. Avoiding this preemptively is easier than fixing it afterwards. Here is the relevant quote from the Chromium C++ style guide:Unlike the Google style guide, Chromium style prefers forward declarations to #includes where possible. This can reduce compile times and result in fewer files needing recompilation when a header changes.You can and should use forward declarations for most types passed or returned by value, reference, or pointer, or types stored as pointer members or in most STL containers. However, if it would otherwise make sense to use a type as a member by-value, don't convert it to a pointer just to be able to forward-declare the type.
On Wed, Jul 7, 2021 at 12:36 PM Hans Wennborg <ha...@chromium.org> wrote:I've filed https://bugs.chromium.org/p/chromium/issues/detail?id=1227131 for those who want to contribute to this as part of the upcoming fixit.--On Thu, Jul 1, 2021 at 6:21 AM Peter Kasting <pkas...@chromium.org> wrote:I encourage other developers to take a stab at this.I just spent one hour, peered through the list from around #100-150, and wrote a pair of patches that will hopefully remove about 1.7 GB of input from the build. It's not difficult to do.PK
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to a topic in the Google Groups "Chromium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/chromium-dev/0ZME4DuE06k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAB8jPhfnzpT0jVFzNX%3DdQ0RLCbpGe6c41meWM1DB%2BegndyrnFg%40mail.gmail.com.
----Bruce Dawson, he/him
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAE5mQiOK3jTukHMSJCQD67LZi8BMEucrmRWQcWPOpZNb5XxGfA%40mail.gmail.com.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/85354122-975b-495a-a339-61f75338cbcan%40chromium.org.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/4608512b7f1b43eb7352d012fcb284a2%40vivaldi.com.
From outside perspective the resent burst in activities to reduce
include dependencies in Chromium including construction of tools to
facilitate that looks puzzling given that it replaces perfectly valid
code. Moreover, the replacement is not necessary neutral since it does
increase maintenance/reviewing cost and there are even suggestions to do
it even if it hurts performance metrics like using more of unique_ptr
for class fields.
And the only justification for doing this refactoring was that it
decreases build time. But with a sufficiently big build cluster this is
not observable. So the conclusion is that apparently saving local build
time without using Goma-like systems became important enough to allow
all these activities that essentially workaround a limitation of the
build system.
But then 2 years ago one of the argument against Jumbo was that it
required extra efforts to maintain workarounds for limitations of the
build system. So what changed during the last two years that now it is
OK to do such efforts? And if it is OK now, why not to consider Jumbo 2?
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/8b12c5346f751f99794e7dbaf249e3ea%40vivaldi.com.
From outside perspective the resent burst in activities to reduce
include dependencies in Chromium including construction of tools to
facilitate that looks puzzling given that it replaces perfectly valid
code. Moreover, the replacement is not necessary neutral since it does
increase maintenance/reviewing cost and there are even suggestions to do
it even if it hurts performance metrics like using more of unique_ptr
for class fields.
And the only justification for doing this refactoring was that it
decreases build time. But with a sufficiently big build cluster this is
not observable.
So the conclusion is that apparently saving local build
time without using Goma-like systems became important enough to allow
all these activities that essentially workaround a limitation of the
build system.
But then 2 years ago one of the argument against Jumbo was that it
required extra efforts to maintain workarounds for limitations of the
build system. So what changed during the last two years that now it is
OK to do such efforts? And if it is OK now, why not to consider Jumbo 2?
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/8b12c5346f751f99794e7dbaf249e3ea%40vivaldi.com.
From outside perspective the resent burst in activities to reduce
include dependencies in Chromium including construction of tools to
facilitate that looks puzzling given that it replaces perfectly valid
code.
Moreover, the replacement is not necessary neutral since it does
increase maintenance/reviewing cost
there are even suggestions to do
it even if it hurts performance metrics like using more of unique_ptr
for class fields.
And the only justification for doing this refactoring was that it
decreases build time.
But with a sufficiently big build cluster this is
not observable.
For those who haven't seen it yet, I would like to plug the Chrome #include Analysis dashboard [1].The tool analyzes the graph formed by #include directives in the C++ source code and shows things such as: how many times a header is included directly and indirectly, the transitive size of each file, which headers contribute the most to the compiler input size, etc.The "Per-Edge Analysis" [2] is especially useful, as it shows which edges in the graph are responsible for adding the most compiler input size. This can be used as a list of includes to consider for removal to reduce build times.Old analyses are archived at [3].We have been using this tool for a while to drive the removal of superfluous includes to speed up the build: https://crbug.com/242216 Thanks to that, the Chromium Build Time graph [4] is now trending down.If you would like to help speed up the build, perhaps as a quick break from more complicated work, consider looking at [2] and see if you find any includes which seem unnecessary or could be replaced by forward declarations or other simple code changes. Edges at the top are often harder to remove (otherwise they'd be gone already), but there should be plenty of opportunities a bit further down the list -- or perhaps look in a corner of the codebase that you're particularly familiar with. Faster builds are better builds!
Thanks,Hans
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAB8jPhfv%2Bm%2BnXszY2RWd0USvRizNLYadWoiXKA8pyiLz1B_gRA%40mail.gmail.com.
On Wed, 30 Jun 2021 at 21:49, Hans Wennborg <ha...@chromium.org> wrote:For those who haven't seen it yet, I would like to plug the Chrome #include Analysis dashboard [1].The tool analyzes the graph formed by #include directives in the C++ source code and shows things such as: how many times a header is included directly and indirectly, the transitive size of each file, which headers contribute the most to the compiler input size, etc.The "Per-Edge Analysis" [2] is especially useful, as it shows which edges in the graph are responsible for adding the most compiler input size. This can be used as a list of includes to consider for removal to reduce build times.Old analyses are archived at [3].We have been using this tool for a while to drive the removal of superfluous includes to speed up the build: https://crbug.com/242216 Thanks to that, the Chromium Build Time graph [4] is now trending down.If you would like to help speed up the build, perhaps as a quick break from more complicated work, consider looking at [2] and see if you find any includes which seem unnecessary or could be replaced by forward declarations or other simple code changes. Edges at the top are often harder to remove (otherwise they'd be gone already), but there should be plenty of opportunities a bit further down the list -- or perhaps look in a corner of the codebase that you're particularly familiar with. Faster builds are better builds!Is there any good way to measure the impact of a change?
--F--Thanks,Hans
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAB8jPhfv%2Bm%2BnXszY2RWd0USvRizNLYadWoiXKA8pyiLz1B_gRA%40mail.gmail.com.
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAAozHLk_WuA50aF5kJj%2BxXrW4d71iNtVB2N%2BzNwXvMOY-gGsOA%40mail.gmail.com.