martinrotter / rssguard

Feed reader (and podcast player) which supports RSS/ATOM/JSON and many web-based feed services.
GNU General Public License v3.0
1.56k stars 124 forks source link

[FR]: Occasionally dump the database to disk if it is located in memory #1385

Open Ac314 opened 5 months ago

Ac314 commented 5 months ago

Brief description of the feature request

Having the database resided in memory is good for performance but could make trouble if app session is quite long (and crash happens for some reasons). It is a good idea to dump the database to the disk periodically.

The dump itself could be performed (for example) under the following conditions: 1) Database is marked with "dump needed" (meaning database changes were made since the last dump) 2) Application is minimized (so we know that user is not making any operations with it now) 3) Application is in idle mode for at least 60 seconds (so the app itself does not perform any operations for some time)

In this case it is safe to make a dump because it will have no interference with the user and/or app actions and will not affect performance.

tuxwise commented 4 months ago

Seconding this, because on my machine shutting down the computer without closing RSS Guard first results in an old database state being restored, next time.