From 176c9173ae740debc7c46b72040f43772b244c54 Mon Sep 17 00:00:00 2001 From: Henrik Tunedal Date: Sun, 13 Feb 2011 20:37:35 +0100 Subject: [PATCH] Add preference for SQLite "synchronous" flag By default SQLite runs with synchronous=FULL, which is the safest mode and uses fsync() a lot, but this interacts very badly with Samsung's infamous RFS filesystem. With this preference the user can decide whether to sacrifice some safety for reasonable performance. --- res/values/array.xml | 13 +++++++++++-- res/values/strings.xml | 3 +++ res/xml/preferences.xml | 4 ++++ src/org/fdroid/fdroid/DB.java | 30 ++++++++++++++++++++++++++++++ 4 files changed, 48 insertions(+), 2 deletions(-) diff --git a/res/values/array.xml b/res/values/array.xml index 758da0f35..aa3def54d 100644 --- a/res/values/array.xml +++ b/res/values/array.xml @@ -7,7 +7,6 @@ Every 12 Hours Daily - 0 1 @@ -16,4 +15,14 @@ 24 - \ No newline at end of file + + Off (unsafe) + Normal + Full + + + off + normal + full + + diff --git a/res/values/strings.xml b/res/values/strings.xml index b965cb61d..112508ad8 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -124,4 +124,7 @@ Enable expert mode Search applications + + Database sync mode + Set the value of SQLite\'s "synchronous" flag diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index d82b5164a..8cb05494e 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -4,6 +4,10 @@ +