pret / pokeemerald

Decompilation of Pokémon Emerald
2.28k stars 2.55k forks source link

[Build System Rewrite] Massive build speed improvement via scaninc changes #1954

Closed Icedude907 closed 1 month ago

Icedude907 commented 12 months ago

Description

Works by generating .d files with scaninc, allowing for parallel dependency scanning. This massively improves warm-up time. Building starts almost instantly now.

Benchmarks courtesy of lunos4026 on discord: Subsequent builds are ~35s faster

Environment: Ubuntu 22.04.3 LTS running on WSL (1).
System: i3 2120, 4GB of RAM (Single Channel, DDR3, 659.4 MHz), Seagate BarraCuda 1TB HDD 7200RPM, Windows 11 22H2 (Build 22621.2283).

Clean Pret/Pokeemerald Master branch:
real    1m55.464s
user    0m28.563s
sys     0m55.313s

2nd `time make -j$(nproc)` pass:
real    0m40.738s
user    0m17.703s
sys     0m11.922s

Icedude907's build-scaninc-speed branch:
real    2m16.833s
user    0m27.234s
sys     0m54.859s

2nd `time make -j$(nproc)` pass:
real    0m4.546s
user    0m0.156s
sys     0m0.719s

Discord contact info

icedude907