modm-io / lbuild

lbuild: a generic, modular code generator in Python 3

Home Page:https://pypi.org/project/lbuild

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add caching for generated files

dergraaf opened this issue · comments

Files should not be regenerated if the configuration did not change.

I'm not sure how much time this will save tho. For reference, building node tree for lbuild discover for a large modm example takes ~0.7s, generating the the selected modules takes ~1.8s.

Ok, generating the whole library takes ~5s. Good point.

This needs to be super robust though. There is nothing worse than to start mistrusting lbuild because it didn't rebuild something.

That is true. The solution I had in mind would actually not bring any speed-up (or only if we're IO write limited), but would instead allow to detect local changes by hashing/comparing the output before writing it to the output file. This would solve #19 as well.