7 posts · rss

SharePoint CSOM Performance

Batching, CAML joins, change detection and ExceptionHandlingScope: how to stop SharePoint CSOM making tens of thousands of API calls it never needed to make.

CSOM is old, it is still everywhere, and it will happily let you write code that makes ninety thousand API calls a month when a few thousand would do. That is the thread running through this topic: not “how do I call this”, but “how much is this costing me, and what does the fast version look like”.

The techniques here came out of one long optimisation job. Batching operations instead of executing them one by one. Using CAML joins instead of querying four lists. Detecting whether anything actually changed before writing. Moving error handling to the server with ExceptionHandlingScope. Loading taxonomy fields through an undocumented back door.

Every one of these posts has before and after numbers from real work. Your numbers will differ from mine, and one of these posts is me correcting my own earlier code.

Start here: The SharePoint CSOM Performance Playbook: Stop Paying for Wasted API Calls