> On Feb 16, 2015, at 5:51 AM, Alexander Selling <[email protected]> 
> wrote:
> 
> I keep getting memory warnings during sync, and was hoping to be able to at 
> least release all the memory that's currently being occupied by the 
> replicator.

Yikes, that’s bad. The replicator should not be using much memory, not more 
than 10mb or so.

> What I've tried so far is closing all the databases that I have open and 
> nilling out (and removing observers) my CBLReplication objects. This has no 
> real observable effect when profiling on my iPad mini

Yeah, the replicator runs in a background thread that has its own database 
objects. The CBLReplication object you see is just a façade that communicates 
with the real objects (CBL_Puller and CBL_Pusher) on that thread.

It’s possible the memory usage is coming from app code that’s triggered by 
database-changed or document-changed notifications; or from LiveQueries, which 
are driven by those notifications. But it could also be a CBL bug.

— What version of CBL? Hopefully at least 1.0.3.
— How big are your documents? Attachment size shouldn’t matter, but do any of 
them have huge amounts of JSON?
— Does this happen with push, or pull, or both?
— How fast is the network connection between client and server? (I remember at 
one point there was a memory issue that only showed up with super-fast 
low-latency connections, because the puller could slurp in data faster than it 
could be saved to disk.)

Detailed investigation may require running Instruments to watch where memory’s 
being allocated.

—Jens

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/2794D491-AA28-4A7C-A9F0-92497D7D97D2%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to