Does the startup time of mobile Couchbase make impractical?
I have just started exploring Couchbase Mobile for Android and have been impressed with how far it has progressed. It would be nice to have an alternative to Android's SQLite which would involve less boilerplate code.
The biggest issue I have experienced so far is the startup time of CouchDB. I created a simple app which just starts the database and logs the startup time. The very first ti开发者_运维问答me the app is run, it takes 10 seconds between the call to start it and the callback indicating CouchDB is ready (on a Samsung Captivate). If the app is killed and restarted, this time reduces to 5 seconds which isn't too bad. I am concerned that this will impact usability, even if a splash screen and/or progress dialog is being displayed.
I would like to know how people are handling this long startup time. Does it have a big impact on usability? Is there a way to make it manageable?
Use TouchDB Couchbase Lite instead of Couchbase Mobile. It will cut the startup time from 5-10 seconds to 100 miliseconds. Read the Why-TouchDB document referenced below for the trade offs (It is not an exact replacement) and more detailed information.
Here a paraphrase of the startup time related information from https://github.com/couchbaselabs/TouchDB-iOS/wiki/Why-TouchDB%3F
Couchbase Mobile's code size (~4MB) and startup time (5-10 sec on typical devices) are serious problems, which deter some developers.
TouchDB meets the following requirements: Quick startup time on relatively-slow CPUs; ideally 100ms or less.
Edit: TouchDB has been renamed Couchbase Lite
Are you using the latest version? They have recently reduced the install time by a significant amount.
The sentiment from others using Couchbase is that the times I am seeing might be slightly high and not unreasonable to have a user wait for it to load. There is further discussion on the Mobile Couchbase list.
精彩评论