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 and the ASP.NET Core platforms. Provides the fundamental infrastructure, production-ready startup templates, application modules, UI themes, tooling, guides and documentation.
https://abp.io
GNU Lesser General Public License v3.0
12.31k stars 3.32k forks source link

ABP 8.1.0 & 8.1.1 - GetListAsync is slow #19649

Closed jerinantony11 closed 2 weeks ago

jerinantony11 commented 2 weeks ago

Is there an existing issue for this?

Description

After upgrading from ABP 8.00 to 8.1.0 the GetListAsync & InsertManyAsync are very slow. After testing the 8.1.1, it sloved the InsertManyAsync slowness. The GetListAsync still takes ages when querying large tables.

If I override the GetListAsync with a custom implementation then Its a lot more faster.

Reproduction Steps

  1. Create an ABP 8.1.1 project.

  2. Use GetListAsync in the repository await Repository.GetListAsync (x=> x.abc = 'something')

  3. It takes a while to retrieve records

Expected behavior

The data retrieval shouldn't take long

Actual behavior

The data retrieval takes ages

Regression?

No response

Known Workarounds

overwrite GetListAsync in the repo with something like this

public override async Task<List<myModel>> GetListAsync(Expression<Func<myModel, bool>> predicate, bool includeDetails = false, CancellationToken cancellationToken = default) { var dbContext = await GetDbContextAsync(); var setContext = dbContext.Set<myModel>(); var result = await (from data in setContext.AsNoTracking().Where(predicate) select data).ToListAsync(); return result; }

Version

8.1.1

User Interface

Common (Default)

Database Provider

EF Core (Default)

Tiered or separate authentication server

None (Default)

Operation System

Windows (Default)

Other information

No response

maliming commented 2 weeks ago

hi

This will be fixed in the next release.

See https://github.com/abpframework/abp/pull/19559