Best Practices
7. Performance Optimization and Troubleshooting
after the basic functionality is confirmed, performance tuning ensures that your app runs efficiently under various conditions, including those involving large datasets or resource constrained devices this section focuses on optimizing sync performance and troubleshooting issues that arise in production environments docid\ qtcee3ksk m5gub5wpaa5 enhance sync performance and reliability for point of sale (pos) and kitchen display systems (kds) using bluetooth low energy (ble) this article covers prioritizing critical connections, optimizing ble parameters, leveraging redundant connections, and monitoring real time sync performance to ensure robust operations in dense environments docid\ lgmktk817ccp5tsxxgj z optimize ditto mesh network performance by managing wi fi interference and client load leverage multiple connection types, enable dynamic switching, and balance client connections to reduce congestion and maintain reliable sync in high load environments docid 7ssm36kywc1slxvpd2cjq optimize data storage by using a soft delete pattern and the evict api to free up disk space implement time to live (ttl) strategies to manage document retention, balancing performance and resource usage while ensuring relevant data persists docid\ r5egczjh8kozjwkrtljto for syncing large binary data or files, use ditto's attachments feature instead of embedding them as bytes in documents attachments are not synced by default and must be explicitly fetched using an attachment token linked to the document