-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Split CHIPClusters.cpp to speed up compilation. #11091
Split CHIPClusters.cpp to speed up compilation. #11091
Conversation
PR #11091: Size comparison from 4b6486f to d3e2f1e Full report (27 builds for efr32, k32w, mbed, nrfconnect, p6, qpg, telink)
|
src/app/zap-templates/templates/app/CHIPClustersInvoke-src.zapt
Outdated
Show resolved
Hide resolved
src/app/zap-templates/templates/app/CHIPClustersInvoke-src.zapt
Outdated
Show resolved
Hide resolved
PR #11091: Size comparison from 4b6486f to 932f364 Increases (21 builds for efr32, k32w, mbed, nrfconnect, qpg, telink)
Decreases (3 builds for efr32, nrfconnect, p6)
Full report (27 builds for efr32, k32w, mbed, nrfconnect, p6, qpg, telink)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved assuming resolution of Boris's comments.
Nice build optimization!
/rebase |
This splits up CHIPClusters.cpp into a couple of different files: - CHIPClusters.cpp contains no template specialized methods. - CHIPClustersInvoke.cpp contains all template specialized methods for invoking commands. - CHIPClustersWrite.cpp contains all template specialized methods for doing writes. This resulted in a speed-up of about 30s (from 1m50s to 1m20s) when doing an incremental compilation of chip-tool after touching CHIPClusters.cpp. It does this by better leveraging -jX builds to parallelize compilation. More importantly, this might also provide a pattern for others (like Android) that is running into OOM issues with clang compiling CHIPClusters.cpp.
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
932f364
to
09131e1
Compare
PR #11091: Size comparison from 149e582 to ee570cb Increases (2 builds for linux, telink)
Decreases (11 builds for efr32, linux, qpg)
Full report (20 builds for efr32, k32w, linux, p6, qpg, telink)
|
PR #11091: Size comparison from 149e582 to 91dad09 Increases above 0.2%:
Increases (27 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
Decreases (10 builds for linux, mbed, qpg)
Full report (37 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
* Split CHIPClusters.cpp This splits up CHIPClusters.cpp into a couple of different files: - CHIPClusters.cpp contains no template specialized methods. - CHIPClustersInvoke.cpp contains all template specialized methods for invoking commands. - CHIPClustersWrite.cpp contains all template specialized methods for doing writes. This resulted in a speed-up of about 30s (from 1m50s to 1m20s) when doing an incremental compilation of chip-tool after touching CHIPClusters.cpp. It does this by better leveraging -jX builds to parallelize compilation. More importantly, this might also provide a pattern for others (like Android) that is running into OOM issues with clang compiling CHIPClusters.cpp. * Apply suggestions from code review Co-authored-by: Boris Zbarsky <bzbarsky@apple.com> * Fix regen breakaga * Address review feedback Co-authored-by: Justin Wood <woody@apple.com> Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
This splits up
CHIPClusters.cpp
into a couple of different files:CHIPClusters.cpp
contains no template specialized methods.CHIPClustersInvoke.cpp
contains all template specialized methods for invoking commands.CHIPClustersWrite.cpp
contains all template specialized methods for doing writes.This resulted in a speed-up of about 30s (from 1m50s to 1m20s) when
doing an incremental compilation of chip-tool after touching
CHIPClusters*.cpp
.It does this by better leveraging
-jX
builds to parallelize compilation.More importantly, this might also provide a pattern for others (like
Android) that is running into OOM issues with clang compiling
CHIPClusters.cpp.