4

Is it normal situation that calling Execute on 9000 custom object from database take circa 10 sec ?

var client = new RestClient("http://localhost:8732/carservice");
var request = new RestRequest(Method.GET);
request.Resource = "GetCarList";
var response = client.Execute<List<Car>>(request);

and method working on ms sql:

public List<Car> GetCarList()
{
   using (var context = new CarEntities(DbAccess.connectionString))
   {
       return context.Car.Include("Owner").Include("Place").Include("Model").ToList<Car>();
   }
}

and service:

[OperationContract]
[WebGet(ResponseFormat=WebMessageFormat.Xml)]
List<Car> GetCarList();
Saint
  • 5,397
  • 22
  • 63
  • 107
  • What takes 10 seconds - getting the objects from the database or transferring them over the wire? For the first I would be greatly surprised unless you are running on some prehistoric hardware, for the second it's more realistic -> serializing such large volume and sending it over the wire could take significant amount of time. You might consider implementing pagination on the service to improve performance. – Darin Dimitrov Nov 19 '13 at 15:55
  • @Saint Please share your solution, if you had resolved it. – hiFI Sep 21 '16 at 06:55

0 Answers0