EF Core Performance 2

Regarding last week’s blog in optimizing EF core performance , the cartesian explosion was optimized to a slight extent successfully using explicit loading and removing several repetitive code . The data of this performance is tracked with the help of performance profiling .

I optimized the problem by starting a timeline profiling session provided by visual studio , here are the following steps :-

Step 1 : In visual studio , go to Debug and click performance profiler

Step 2 : Select Application Timeline and Database (examine the SQL query to measure time)

Step 3 : Click start , navigate to the cause of the UI freeze and click “Stop Collection”

Following these steps we are able to analyze where is the memory traffic coming from , then improving the code and fixing the issue .

In summary , profiling helps a lot in detecting what causes performance issues , for less experienced developers we have to be careful in retrieving so called “list” or static data using database connection every time in a loop or repetitive process . After many trial and error , I manage to optimize the performance loading in the SandBoxApp .

Leave a Reply