It is common to manipulate the sources and targets of associations in moose but in case we need them extensively it can take some time to get them because we compute them from the meta description.
In this change I'm adding a cache to get the source and target selectors which speed up quite a bit the code.
I had a piece of code taking 200ms that got down to 28ms with this change. Out of the 28ms, only 2ms are now spent in getting the source and target
It is common to manipulate the sources and targets of associations in moose but in case we need them extensively it can take some time to get them because we compute them from the meta description.
In this change I'm adding a cache to get the source and target selectors which speed up quite a bit the code.
I had a piece of code taking 200ms that got down to 28ms with this change. Out of the 28ms, only 2ms are now spent in getting the source and target