When is the best practice for calling compact? And Would it happen if it is never called? I’m looking at some doc sync issues and I tracked it down to something that might related to calling compact. This is my current scenario:
- App calls compact() everytime it goes into the background.
- If a documented just got updated through a live query for a db that is also replicating with the SynchGateway and I put the app in the background (compact gets called) and then I opened the view that displays the document detail again, the document displays the previous document version and it is not until the replication finishes again that the document is updated. Although in this specific case (coming back from the background after calling compact) the doc replication takes a lot longer (20 secs aprox) vs opening the document when compact() is not called (2sec aprox)