Reputation: 263
I have a production server (which is available over the internet) in which two applications are running one is in Java and the other is Dot Net. The response of Java application is comparatively faster than Dot Net. For dot net application MVC, My SQL, Entity Framework and LINQ is used. Java application also connected to MY SQL of same server.
In dot net application, the movement it hits the controller action and just before leaving the controller action, it writes the time stamp into log file. There is query executed and filtered the data using LINQ. All these are happening in 2 seconds. But the response to the browser takes time (15-20 seconds). In chrome browser "Network" tab, all the javascripts/css/images are getting loaded in less than 100 ms. I have checked the "Waiting (TTFB)" is taking for the main controller action, it is taking around 15 seconds. Document is also not huge, it is just 20 kb.
Now my question is, 1. What is the reason for such a huge TTFB ? 2. How to reduce the TTFB, (did not find proper answer). Is it because of Entity Framework/ LINQ.
Thanks in advance.
Upvotes: 0
Views: 182
Reputation: 87
There would be performance issues, for millions of records in Entity Framework/ LINQ if queries are not used properly like using .ToList() function for counting rows instead use .Count() only.
Upvotes: 1