Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 637e7098 authored by Shai Barack's avatar Shai Barack
Browse files

Experiment to skip fsync in SharedPreferences

The next steps are to ramp this to trunk partial,
and study the impact on droidfood metrics.

Flag: android.app.sharedpreferences_skip_fsync
Bug: 435433868
Change-Id: I8af24ca2df9d6ef7417222589c580fd858d6d09b
parent 2a72e610
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -812,7 +812,9 @@ final class SharedPreferencesImpl implements SharedPreferences {

            writeTime = System.currentTimeMillis();

            if (!Flags.sharedpreferencesSkipFsync()) {
                FileUtils.sync(str);
            }

            fsyncTime = System.currentTimeMillis();

+7 −0
Original line number Diff line number Diff line
@@ -37,3 +37,10 @@ flag {
    description: "Include the ANR subreason in the description retrieved from ApplicationExitInfo"
    bug: "295599954"
}

flag {
     name: "sharedpreferences_skip_fsync"
     namespace: "system_performance"
     description: "What if SharedPreferences just didn't fsync()? Let's find out."
     bug: "435433868"
}
 No newline at end of file