Small improvements

pull/205/head
M66B 3 years ago
parent 47c9c49bba
commit a823be8a2d

@ -1087,11 +1087,13 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
continue;
if ("query_threads".equals(key))
continue;
// Prevent restart
if ("secure".equals(key) ||
"shortcuts".equals(key) ||
"language".equals(key) ||
"query_threads".equals(key) ||
"wal".equals(key))
continue;

@ -263,7 +263,6 @@ public class ApplicationEx extends Application
case "secure": // privacy
case "shortcuts": // misc
case "language": // misc
case "query_threads": // misc
case "wal": // misc
// Should be excluded for import
restart(this);

@ -565,7 +565,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
rvMessage.setHasFixedSize(false);
int threads = prefs.getInt("query_threads", 4);
int threads = prefs.getInt("query_threads", DB.DEFAULT_QUERY_THREADS);
if (threads >= 4)
rvMessage.setItemViewCacheSize(10); // Default: 2
//rvMessage.getRecycledViewPool().setMaxRecycledViews(0, 10); // Default 5

@ -95,10 +95,8 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
return localExecutor;
if (globalExecutor == null) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
int threads = prefs.getInt("query_threads", Runtime.getRuntime().availableProcessors());
Log.i("Task threads=" + threads);
globalExecutor = Helper.getBackgroundExecutor(threads, "task");
int processors = Runtime.getRuntime().availableProcessors();
globalExecutor = Helper.getBackgroundExecutor(processors, "task");
}
return globalExecutor;

@ -628,10 +628,10 @@
<string name="title_advanced_protocol">Protocol logging</string>
<string name="title_advanced_log_info">Debug logging</string>
<string name="title_advanced_debug">Debug mode</string>
<string name="title_advanced_room_query_threads" translatable="false">ROOM query threads %1$s</string>
<string name="title_advanced_room_query_threads" translatable="false">ROOM query threads: %1$s</string>
<string name="title_advanced_wal" translatable="false">WAL</string>
<string name="title_advanced_checkpoints" translatable="false">Checkpoints</string>
<string name="title_advanced_sqlite_cache" translatable="false">Sqlite cache %1$s %% - %2$s</string>
<string name="title_advanced_sqlite_cache" translatable="false">Sqlite cache: %1$s %% - %2$s</string>
<string name="title_advanced_modseq" translatable="false">MODSEQ</string>
<string name="title_advanced_expunge" translatable="false">EXPUNGE</string>
<string name="title_advanced_auth_plain" translatable="false">PLAIN</string>

Loading…
Cancel
Save