I have a fairly big database with a table containing near 9K rows. When I fetch the collection the request takes about 8 seconds but the localsync methods takes a lot more and blocks the application.
After some debugging I found that the problem is that for each model it does the following:
This is inefficient. I think the Collection should keep track of what models were stored in an array, and after all the models are stored it should write the string with all the models ids.
And the fetch method that triggers this behaviour should return a promise that resolves when all the models are stored.
I welcome patches that improve the efficiency! If you're up to it, feel free to ask me any questions you have along the way.
Be aware of the async branch, which will be 2.0 when someone gets around to testing it and working out any issues. :-) That branch does return promises for everything. If that's what you need, you may want to experiment with using that branch. It has been so long since I have been able to work on it, I can't remember what was blocking its release. I think the test suite should tell you though.