Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up #source and #target on associations #770

Merged
merged 2 commits into from
May 14, 2024

Conversation

jecisc
Copy link
Member

@jecisc jecisc commented May 14, 2024

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

jecisc and others added 2 commits May 14, 2024 16:42
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
@jecisc jecisc merged commit 449e884 into development May 14, 2024
3 of 4 checks passed
@jecisc jecisc deleted the speedup-source-target branch May 14, 2024 14:54
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.

1 participant