We are creating N-Tier apps using Azure Web Roles with SQL Azure Database backend with EF as our ORM. When are developing sites we have noticed that they tend to perform signifncalty worse in the real world. This is largely due to EF lazy loading large parts of data. We have used Miniprofiler which gives some good notification but it doesn’t really give the feel of what the site would operate like in a live environment.
Is there anyway that we can get our local database to take say 100ms to respond to each query thus simulating the round trip time between tiers? This will hopefully give developers an easy feel when developing the system locally that they need to optimise EF queries.
I can imagine using custom EF Provider wrapper where every DB command execution will be preceded with
Thread.Sleepbut I believe there will be some tools to achieve this as well.