Skip to content

add cache to optimize pragma processing#31

Merged
seilc merged 1 commit intobfbbdecomp:masterfrom
mattbruv:optimize
Oct 29, 2020
Merged

add cache to optimize pragma processing#31
seilc merged 1 commit intobfbbdecomp:masterfrom
mattbruv:optimize

Conversation

@mattbruv
Copy link
Copy Markdown
Member

Made it so the pragma script creates a .pragma cache folder where it saves the results of the assembly scraping as a key/value pair based on the function being imported for fast lookup.

Making changes to large files now doesn't take any more time than a tiny file. It's practically instant.

Running time python tools/inlineasm/globalasm.py -s src/Game/zEntPlayer.cp:

Without cache:

0:04.07 elapsed
0:03.76 elapsed
0:03.72 elapsed
0:03.69 elapsed
0:03.71 elapsed

With cache:

0:00.30 elapsed
0:00.26 elapsed
0:00.27 elapsed
0:00.28 elapsed
0:00.26 elapsed

Running make on the entire project from scratch takes about 2 minutes, and then cleaning and running make again with the pragma cache saves about 16 seconds of build time for me.

@seilc seilc merged commit 5c3dc5c into bfbbdecomp:master Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants