vpmalley / radiofeedz

rss reader refined for media
2 stars 0 forks source link

random SQLiteDatabaseLockedException, fix it #25

Closed vpmalley closed 9 years ago

vpmalley commented 9 years ago

SQLiteDatabaseLockedException: db is locked sometimes happen. This is very rare so far, but may increase with number of feeds/processors. A priori there are a couple ways to fix it, most require to reshape the DB layer. One cool way would be to use a ContentResolver.

It is a long-term enhancement for now as it happens pretty rarely.

vpmalley commented 9 years ago

fixed with serial execution - not slowing things down

vpmalley commented 9 years ago

This is probably not enough - especially when clicking a news item during feed refresh, the user should wait for a long time and probably get a wrong news item.

vpmalley commented 9 years ago

improved by reducing the refresh time

vpmalley commented 9 years ago

finally solved by having one connection to the DB (i.e. one instance of the SQLiteOpenHelper).