Roman Roman - 11 months ago 48
Android Question

Android SQLite lags

In my android app I store data in local SQLite database. Until size of this DB is less then 8-9 mb, everything works like a charm; however, once DB size is about 9 mb it keeps writing in the logcat:

Window is full: requested allocation 228 bytes, free space 192 bytes, window size 2097152 bytes

Which results in very very long time on simple queries like SELECT * WHERE

What do I do wrong? What may be the problem? I checked my Cursor object, I close it everywhere, and only when db size is above this point Cursor sends warnings.


UDATE: I use "application inner database", not sd card one. Might switching to an SD card location help?

Answer Source

Without seeing your code or even testing your app it's really hard to say at this point:

So, check your queries and read up on the limits of sqlite. You could move your db to the sd card like the linked question OP did but he was loading up database stored images.