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

AddOrReplaceEvent when unit of work CompleteAsync. #21211

Merged
merged 2 commits into from
Nov 7, 2024
Merged

Conversation

maliming
Copy link
Member

@maliming maliming commented Oct 30, 2024

If we call Insert to add many entities, the AddOrReplaceEvent check will be polynomial growth.

We can do the add or replace in the CompleteAsync method for better performance.


Check after each addition: Time complexity is O(N * M), which slows down with more projects.
Check after all additions: Time complexity is O(M + N), which is more efficient.

Feedback from https://abp.io/support/questions/8152/ABP-InsertManyAsync-extremely-slow-with-many-thousands-of-entities

@maliming maliming added this to the 9.0-final milestone Oct 30, 2024
@hikalkan hikalkan merged commit 104ed13 into rel-9.0 Nov 7, 2024
2 of 3 checks passed
@hikalkan hikalkan deleted the UnitOfWork branch November 7, 2024 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants