lists.asmx = Web Service
listdata.svc = REST API
client.svc = CSOM

Using JavaScript to query a list using the 3 available APIs, I'm finding lists.asmx responds much faster than listdata.svc or client.svc. For all three queries, I'm setting the ViewFields and/or $select properties to pull only 3 fields from the list which has about 400 items

I see this trend on my local SP2010 VM, and the SP2010 servers my company has deployed.

API            Size     Timeline
lists.asmx     46KB     131ms
listdata.svc   12.5KB   889ms
client.svc     40KB     326ms

What's going on? Why would these two new (to 2010) APIs be slower?

  • 2
    under what conditions? does order matter? did the second execution of any method return different results? benchmarking is tricky. – Tom Resing Mar 15 '13 at 0:32
  • Very interesting data. I suppose we'd need to run similar queries in multiple environments against different sources to be sure, but the numbers feel right based on my experience. If you think about the transformations which must occur under the covers (none of which are "free"), it makes some sense. – Marc D Anderson Jul 4 '13 at 19:13

Try to limit your query: Use the ViewFieldsOnly flag. Be sure that it is set! You can use the CAML query builder to check your queries: http://www.codeproject.com/Articles/458008/CAML-Query-Builder


Alway use filters for indexed columns first, like

Query = "<Where><Geq><FieldRef Name='ID' /><Value Type='Number'>1</Value></Geq</Where>"

that will increase performance. So query with indexed field ID faster then without.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.