I have a Windows application that is connecting to a WCF Data Service hosted on the same machine.
The first thing that occurs when the application starts is a query that returns 0 to 3 results. Here's the code:
var environments = ctx.Environments
.AddQueryOption("$filter", "Environment eq '" + ConfigurationManager.AppSettings["environment"] + "'")
.AddQueryOption("$expand", "Departments, SecurityGroups");
The very next thing I do is check if (environments.Count() == 0) which takes about 10 seconds to evaluate. It seems to be slowest the first time, but always takes more than 6 seconds. However, if I'm running Fiddler, I always get the results back immediately.
Why does running Fiddler make it faster?