abpframework / abp

Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
https://abp.io
GNU Lesser General Public License v3.0
12.95k stars 3.45k forks source link

insert lots of datas too slow #18649

Open bingzhizhi opened 10 months ago

bingzhizhi commented 10 months ago

Description

await _unitOfWorkManager.Current.SaveChangesAsync(); it too slow when i insert massive data This problem has a solution in efcore, set context.Configuration.AutoDetectChangesEnabled false In abp how to set AutoDetectChangesEnabled

bingzhizhi commented 10 months ago

here is stackflow link https://stackoverflow.com/questions/21272763/entity-framework-performance-issue-savechanges-is-very-slow

realLiangshiwei commented 10 months ago

You can use this library for bulk operations https://learn.microsoft.com/en-us/ef/core/extensions/#efcorebulkextensions