zephyr
zephyr copied to clipboard
file caching and dependency listings
Thank you very much for this nice tool. I use it for purescript-native cpp code generation: PureScript Shared Objects It is essential in the sence that the ffi implementations are not complete and zephyr allowes me to generate only the code which is just needed and does not pull in references of unimplemented functions. One issue i stumbled across is that zephyr creates new files for each run, regardless if the contents has changed or not. This will trigger all depending compilations which should not necessary at all. I worked around this by comparing the file sizes with the previous run, if they match then the new file gets the timestamp of the older file. (zephyr.bash in the mentioned repo) The second issue is that I would like to get the dependencies for groups of entry points. I use this for automatic assembling of the libraries and applications. I worked around this by calling zephyr for each group for different output directories. This should be possible in one run too. If this makes sense for you I would like to hear from you. I could try to implement this if you give me some guidance. Thanks a lot!
Caching
This is not easy, as zephyr
is doing global analysis across module boundaries. This means that even if a file hasn't changed, something else now can require something from the module. But we could cache the internal graph for that module. That could give a quite good performance improvement, but it's worth to profile zephyr
to see how much that would help or if there are other possible improvements.
Group dependencies
You already can give multiple entry points. Is this what you're looking for?
I suspected that this is a challenge. Yes I use multiple entry points but what I have to know is which sub group of entry points has which dependencies (list of modules). Right now I run zephyr multiple times with different entry point groups was is stupid from the performace point of view. This bash script does what I need for two given groups of entry points, It makes 3 zephyr runs, one with all given entry points, this corefn output will be used further. The other two runs with the one and second group as argument go to different output directories and there I use just the names of the directories (module names). So a file for each group containing the list of modules would be sufficient. Thank you for your time :)
majority of time zephyr spends on reading and parsing data, doing it once would be indeed more efficient.