Closed nawtrey closed 3 months ago
I'm going to close this. While this may lead to a performance improvement, I think the performance improvement would be somewhat random. Moreover, changes in b932af65a587497203c9e6ce29bad5ae6d83550e and 13f0dd3701496094e68281efe8888bac60e51868 and ad83127a03acf826f350c2381ded1896082030c7 and da4cd1c8262fe6106305eaa4834f0e0daf43ec4e may have made this moot.
When working on PR #25 I wrote a variant of
generate_flux_diagrams()
that used a while-loop to count how many cycles were in each diagram, and when it detected more than 1, it broke the loop. This seemed to be faster, but I didn't have a chance to test it thoroughly so I decided to go with a more straight-forward approach.The code:
This works well enough, but the performance improvement depends on the order of the cycles returned by
nx.simple_cycles()
. So for some cases it could be substantially faster, but others could be the same. I would need to see solid evidence that it improves performance before switching to this, so for now I'm just going to dump it here.