Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parallel_textgen: run textgen in parallel
textgen: instead of running ImageMagick yourself, output a Makefile rule for each graphic. Dependencies are passed on the command line. Makefile: Add rule for 'textgen.mk' which is built by running textgen. graphics.stamp depends on textgen.mk and all the built graphics files. Then, each built graphic depends on textgen.mk, ensuring it is made first. textgen.mk itself depends on textgen config, font, and dehacked. (Makefile itself also depends on textgen.mk implicitly via include) This duplicates previous behaviour where changing textgen config remakes all text graphics, but one Make rule for each, allowing parallel make with -j instead of the script doing one at a time. The built IWADs are byte-for-byte identical before and after this patch series is applied (provided VERSION is set to the same thing of course) One problem is 'make clean' rebuilds textgen.mk because Make thinks the Makefile needs it, but then immediately deletes it. Not sure how to fix. Use git clean -fdx instead, or just don't clean twice in succession. ---- This gives the following improvement in build time (-j1 as control, built on 4 cores and a large tmpfs so disk speed isn't a factor) (master) make -j1 4.83s user 6.77s system 93% cpu 12.444 total make -j1 4.74s user 6.72s system 93% cpu 12.267 total make -j1 4.72s user 6.68s system 92% cpu 12.292 total make -j4 5.72s user 6.77s system 109% cpu 11.414 total make -j4 5.39s user 6.85s system 107% cpu 11.419 total make -j4 5.66s user 6.79s system 109% cpu 11.383 total parallel_textgen make -j1 4.57s user 6.66s system 92% cpu 12.185 total make -j1 4.73s user 6.57s system 93% cpu 12.152 total make -j1 4.60s user 6.72s system 93% cpu 12.152 total make -j4 5.62s user 7.72s system 262% cpu 5.084 total make -j4 5.82s user 7.76s system 262% cpu 5.165 total make -j4 5.79s user 7.73s system 261% cpu 5.161 total
- Loading branch information
3143339
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.
Late reply, but kudos for this - it's an elegant solution / improvement.