Performance Improvement with Delta Tracking and Caching¶
You can use delta change tracking (delta tracking for short) and data caching to significantly improve the performance of mobile services.
OData delta tracking is a method by which a client obtains changes from an OData service without downloading the entire data set. Set up the
track_deltas parameter in your application configuration file to track deltas when you configure your defining queries. If your OData service supports the delta query protocol to track changes, the provided delta links automatically track changes and you don't need to configure delta tracking. When possible, use an OData service that supports the delta query protocol.
Delta tracking sends only changed data to the client, rather than the entire data set. This significantly decreases the load on the back end and is especially useful when performance is critical.
If your OData service does not support delta tracking, the default delta tracking setting in the application configuration file tracks deltas using mobile services. This improves performance on the client, while tracking deltas using the OData service improves performance over the entire network.
If your OData service has limited support for delta tracking, for example, deltas expire after a set period of time, using the ALWAYS setting for delta tracking in the application configuration file helps fill the missing delta tracking functionality.
If all or most of your data is continuously changing so that you expect to be downloading the full data set during every download, enabling delta tracking does not improve performance. For example, if you download the temperature value for sensors in 1000 offices, using delta tracking does not decrease the amount of data downloaded during a download and turning off delta tracking may increase performance.
To minimize the load on the OData service and possibly improve performance, cache data that is shared by numerous users on mobile services. For example, cache data from a query that returns the same results to multiple users. Do not cache data from a query that returns different results to each user. Set up the
is_shared_data parameter to cache data when you configure your defining queries in your application configuration file.