-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fix looking on all resources when retrieving extensions for preloading collection #463
Conversation
…g collection Signed-off-by: BOUHOURS Antoine <[email protected]>
Signed-off-by: BOUHOURS Antoine <[email protected]>
Signed-off-by: BOUHOURS Antoine <[email protected]>
Now, I'm not sure what's best here:
|
…ces map Signed-off-by: BOUHOURS Antoine <[email protected]>
Quality Gate passedIssues Measures |
After discussing with Jon, we decided to return null for the two methods to avoid the overhead on import/export. I will do another PR so that these methods return void and are only used to load extension to cache and not return extensions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests ok. Performances for import/export are back to normal
…g collection (#463) Signed-off-by: BOUHOURS Antoine <[email protected]>
Please check if the PR fulfills these requirements
What kind of change does this PR introduce?
In #411, we introduced a regression where we are looking over all resources to return a map in
getAllExtensionsAttributesByResourceType()
andgetAllExtensionsAttributesByResourceTypeAndExtensionName()
.Instead we now return null to avoid looking over all resources. We should refactor this method to return void in another PR.
What is the current behavior?
Looking over all resources to return a map in
getAllExtensionsAttributesByResourceType()
andgetAllExtensionsAttributesByResourceTypeAndExtensionName()
takes around 10ms, when writing a network it's called for each equipment which can lead to very long import/export of networks.What is the new behavior (if this is a feature change)?
We now return null to avoid looking over all resources. We should refactor this method to return void in another PR.