OSDN Git Service

Enable sendfile() and splice() optimizations.
authorJeff Sharkey <jsharkey@android.com>
Thu, 1 Feb 2018 04:51:57 +0000 (21:51 -0700)
committerJeff Sharkey <jsharkey@android.com>
Thu, 1 Feb 2018 04:52:00 +0000 (21:52 -0700)
This can easily be reverted if we uncover any trouble.

Test: bit FrameworksCoreTests:android.os.FileUtilsTest
Test: vogar --mode app_process --benchmark frameworks/base/core/tests/benchmarks/src/android/os/FileUtilsBenchmark.java
Bug: 71932978
Change-Id: Iac97c342948074c4f373e5f2ae70e563b308a11e

core/java/android/os/FileUtils.java

index 9a64cc7..21d245d 100644 (file)
@@ -89,7 +89,7 @@ public class FileUtils {
 
     private static final File[] EMPTY = new File[0];
 
-    private static final boolean ENABLE_COPY_OPTIMIZATIONS = false;
+    private static final boolean ENABLE_COPY_OPTIMIZATIONS = true;
 
     private static final long COPY_CHECKPOINT_BYTES = 524288;