- Before you run an application, you will need to create a database (I'm using MSSQL) named "OptimizeMePlease"
- Go to Program.cs class
- "IWillPopulateDate()" is a method which will get a script from the project directory and run in on created DB
- Run application in Debug/Release mode
- Comment or delete IWillPopulateData() call from Main method
- Go to BenchmarkService.cs class
- Start coding within GetAuthors_Optimized method
- Clone the project, create a branch and work on that branch.
- If you don't want to bother with github, after you're done with the changes, send me the results on Linkedin.
- Only Entity Framework (Core) is allowed for using
- The data obtained in the non-optimized version of the code must also be obtained in the optimized version
- If you see potential optimization of something else, you can do it
- Entities and DbContext cannot be changed (you got legacy code no matter what it might be bad :) )
- The models returned from the method can be changed
- Given that there is a predefined database of data, the method should in any case return the list of data currently returned by the non-optimized method.
- Given that each of us works on a computer with different performance and power, the execution time quotient of the non-optimized and optimized method will be checked for each separately.
Example:
Non-optimized method Execution time: 1.1s = 1100ms Optimized method Execution time: 200ms
In addition, I will check the performance on my computer for individual results.