- ABP Framework version: v8.1.0
- UI Type: Blazor WASM
- Database System: EF Core (SQL Server)
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
- Steps to reproduce the issue:
- Create a solution with Abp 8.1.0.rc.4
- Add Entity “Book” with Id int, Code String 10 Required , Title String 100 Required
- Open BookManager.cs add the following code in CreateAsync (only for test)
#region test InsertMany
var myBooks = new List< Book >();
for (var i = 0; i < 12000; i++)
{
myBooks.Add(new Book(i.ToString(),$"Title-{i}"));
}
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
await _bookRepository.InsertManyAsync(myBooks, true);
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
Console.WriteLine(ts);
#endregion
- Lunch in Debug
- Via Swagger Post a new Book
- Track the time from console log o via breakpoint. On my Pc is 00:00:05.7310325
- After that upgrade to Abp 8.1.0
- Lunch in Debug
- Via Swagger Post a new Book
- Track the time from console log o via breakpoint. On my Pc is 00:05:05.4026061
It takes 60 times longer !!!
We use InsertMany in import jobs and execution times have now gone from a few seconds to many minutes and those that used to take a few minutes now take hours.
We cannot upgrade to 8.1.0 stable because it would block the application in production.
From the release logs there is no evidence of changes in this area.
What has changed?
10 Answer(s)
-
0
Hi,
Could you please share the test project with me? I will check it. thanks. shiwei.liang@volosoft.com
-
0
HI, sent you the email with the test projects
-
0
Hi,
Thanks, I will check asap
-
0
Hi,
I can confirm this problem, we will fixed in the next patch version. your ticket was refunded.
This is a temporary solution:
[Dependency(ReplaceServices = true)] [ExposeServices(typeof(AbpEfCoreNavigationHelper))] public class MyAbpEfCoreNavigationHelper : AbpEfCoreNavigationHelper { public override void ChangeTracker_Tracked(ChangeTracker changeTracker, object? sender, EntityTrackedEventArgs e) { } public override void ChangeTracker_StateChanged(ChangeTracker changeTracker, object? sender, EntityStateChangedEventArgs e) { } }
Configure<AbpEntityChangeOptions>(options => { options.PublishEntityUpdatedEventWhenNavigationChanges = false; });
-
0
Does this fix disable change tracking for all entities? We have AggregateRoot type entities such as Order with List of OrderItem, does this fix have any impact on this? I believe that if I implemented it, I would break other parts of our application.
Can you explain the workaround better?
Thanks
-
0
hi
We fixed this problem with https://github.com/abpframework/abp/pull/19538
You can create an
AbpEfCoreNavigationHelper
based on the PR's code, then inject and use it inDbContext
. -
0
Will the fix be released in version 8.1-patch or versione 8.2-preview? Which is the estimated release date of the 8.1-patch?
Thanks
-
0
hi
The next release will be 8.1.1.
I think it will be released within 2 weeks.
You can override it now.
Thanks
-
0
Thank you, but it is not our practice to perform temporary workarounds when the fix is released soon.
We are waiting for the fix.
Best regards
-
0
Thanks. 8.1.1 will be coming soon.