-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Improve performance of connectionOperation functions #11702
Conversation
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.
Left an important comment about removing the line of code that is hurting performance and is no longer necessary with this change. Other than that, this LGTM
} | ||
|
||
@Test | ||
public void testDeleteStandardSync() |
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.
public void testDeleteStandardSync() | |
public void testDeleteStandardSyncOperation() |
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.
Done
@@ -173,9 +173,9 @@ public void deleteOperationsForConnection(final StandardSync standardSync, final | |||
for (final UUID operationId : deleteOperationIds) { | |||
operationIds.remove(operationId); | |||
boolean sharedOperation = false; | |||
for (final StandardSync sync : allStandardSyncs) { | |||
for (final StandardSync sync : configRepository.listStandardSyncsUsingOperation(operationId)) { |
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.
I'm not able to comment on it, but line 171 should be removed from this function, since we no longer need to list all standard syncs:
final List<StandardSync> allStandardSyncs = configRepository.listStandardSyncs();
If this is not removed, we likely will not see as much of a performance improvement from this as we would like!
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.
Thanks, I removed the line.
What
Optimize the way we fetch and delete connections operations
How
Create function in
ConfigRepository
using direct SQL toRecommended reading order