Skip to content
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

Investigate potential ways to improve compile times #23

Open
zvecr opened this issue Jan 20, 2021 · 3 comments
Open

Investigate potential ways to improve compile times #23

zvecr opened this issue Jan 20, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@zvecr
Copy link
Member

zvecr commented Jan 20, 2021

Description

  • Avoid finding all keyboards when building a single board
  • Skipping git operations by default?

Benchmarks performed on a 4970k, default lets_split compile,

$ time make clean lets_split:default

real    0m39.616s
user    0m8.838s
sys     0m18.854s
@zvecr zvecr added the enhancement New feature or request label Jan 20, 2021
@zvecr
Copy link
Member Author

zvecr commented Jan 20, 2021

Good example of where git calls slow down,

$ time SKIP_GIT=true make clean
Deleting .build/ ... done.

real    0m0.395s
user    0m0.060s
sys     0m0.136s

# cold start
$ time make clean
QMK Firmware 0.11.53
Deleting .build/ ... done.

real    0m36.582s
user    0m0.745s
sys     0m8.254s

$ time make clean
QMK Firmware 0.11.53
Deleting .build/ ... done.

real    0m6.728s
user    0m1.787s
sys     0m5.169s

$ time SKIP_VERSION=true make clean
QMK Firmware 0.11.53
Deleting .build/ ... done.

real    0m0.550s
user    0m0.121s
sys     0m0.213s

clean fetches git state to create version.h, throws that away as it doesnt need it and just removes a folder.

Generating the version file seems to be the main culprit of the SKIP_GIT=no slowdown.

@zvecr
Copy link
Member Author

zvecr commented Jan 20, 2021

$ time SKIP_GIT=true make -j$(nproc) --output-sync clean lets_split:default

real    0m12.819s
user    0m5.240s
sys     0m13.298s

Default environment to SKIP_GIT=true and MAKEFLAGS="-j$(nproc) --output-sync"?

@zvecr
Copy link
Member Author

zvecr commented Jan 20, 2021

Force util/list_keyboards.sh to only do

echo "lets_split/rev2"

Results in,

$ time SKIP_GIT=true make -j$(nproc) --output-sync clean lets_split/rev2:default

real    0m8.457s
user    0m4.090s
sys     0m10.041s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant