> On Aug 7, 2014, at 3:48 AM, rupa selvaraj <[email protected]> wrote: > > Currently, based on the number of files, we will detach separate thread with > separate database pointer (using cblmanager copy) for file parsing.That is > working fine.But the app is crashing when we try to use the same model, for > UI loading and for parsing and saving models at the same time but using > different threads and pointers only.
You can't use a CBLModel on a different thread than the one it was created on. (Just like all the other CBL objects.) > Parsing also takes sometime.For 5 jsons files,each of size 700kb to 1Mb takes > 5 to 10 seconds. That's about what I'd expect. I've spent some time looking at JSON parsing performance; a lot of it isn't in the actual parsing but in allocating all of the objects. If you're only going to be using part of the data in the documents, you can speed up the parsing by using a streaming library that doesn't create objects for everything. I like jsonsl <http://github.com/mnunberg/jsonsl>. —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/F5132D6B-13B9-483F-96C5-00F8FE4A2926%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
