dex-backend icon indicating copy to clipboard operation
dex-backend copied to clipboard

[Research] Performance Split Queries

Open niraymak opened this issue 3 years ago • 6 comments

Is your feature request related to a problem? Please describe. Split queries maybe could help to improve the performance. https://docs.microsoft.com/en-us/ef/core/querying/single-split-queries

Describe the solution you'd like Investigate the difference between performance of split and single queries.

Production URL

Additional context

niraymak avatar Mar 30 '21 11:03 niraymak

Please note that this feature was introduced in EF Core 5.0 and DeX is running version 3.1 It might also be worth looking into disabling tracking for 'Get All Projects' query, from my tests, this did significantly improve performance. It does have some side effects, read up on it.

Brend-Smits avatar Mar 30 '21 11:03 Brend-Smits

It should be possible to update EF Core to 5.0 maybe it is also worth it to look into that. AsNoTracking should be looked into for sure. I think it will only cause issues for deletes since the Update method that entity framework has does not look at deleted entities.

TimSnoek123 avatar Mar 30 '21 11:03 TimSnoek123

It should be possible to update EF Core to 5.0 maybe it is also worth it to look into that. AsNoTracking should be looked into for sure.

Definitely, although it will also require you to upgrade .NET Core 3.1 (LTS) to .NET 5 (no LTS) on all projects. This is a significant upgrade...

Brend-Smits avatar Mar 30 '21 11:03 Brend-Smits

Didn't think about LTS thats maybe not a good plan then.

TimSnoek123 avatar Mar 30 '21 11:03 TimSnoek123

Didn't think about LTS thats maybe not a good plan then.

Not running LTS is not a significant issue if you are actively developing the product(DeX is still being actively developed). Research should be done to see if it is worth it to update to .NET 5, and later this year to .NET 6 (LTS), in terms of time vs gains. I'm unsure how much will break from .NET 3 Core -> .NET 5 and .NET 5 -> .NET 6. I suspect the breakages between Core and .NET 5 will be significant, but .NET 5 and .NET 6 will likely not be too bad. See roadmap at: https://github.com/dotnet/core/blob/main/roadmap.md

Brend-Smits avatar Mar 30 '21 11:03 Brend-Smits

Btw i don't think you have to upgrade to .net 5 to use this functionality. ASAM uses ef 5.0.1 and is version .net core 3.1. But it could be different for Dex maybe.

TimSnoek123 avatar Mar 30 '21 18:03 TimSnoek123