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

Commit b81ab201 authored by Cody Northrop's avatar Cody Northrop
Browse files

EGL: Refactor multifile blobcache

After more testing, it became apparent that we need to
avoid accessing the filesystem to have decent speed.

This CL does that by:
* Moving the multifile cache to a class
* Tracking all entries in a bookkeeping system
* Remove use of STL for read/write
* Keep recent entries in a hot cache
* Deferring file writes to a worker thread
* Allowing devices to opt in via config

For more data and details on the design philosophy:
go/improving-multifile-blobcache-speed

Also added a new sequence of tests that bypass EGL
and directly invoke the mulfifile cache.

Test: pubg_mobile_launch ANGLE trace
Test: /data/nativetest64/EGL_test/EGL_test
Test: /data/nativetest64/libEGL_test/libEGL_test
Bug: b/266725576
Change-Id: Ia19147522a6f68f05fbe47c1545e4c9d69e513c6
parent f34df7c2
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -144,6 +144,7 @@ cc_library_static {
    srcs: [
    srcs: [
        "EGL/BlobCache.cpp",
        "EGL/BlobCache.cpp",
        "EGL/FileBlobCache.cpp",
        "EGL/FileBlobCache.cpp",
        "EGL/MultifileBlobCache.cpp",
    ],
    ],
    export_include_dirs: ["EGL"],
    export_include_dirs: ["EGL"],
}
}
@@ -160,7 +161,6 @@ cc_library_shared {
    srcs: [
    srcs: [
        "EGL/egl_tls.cpp",
        "EGL/egl_tls.cpp",
        "EGL/egl_cache.cpp",
        "EGL/egl_cache.cpp",
        "EGL/egl_cache_multifile.cpp",
        "EGL/egl_display.cpp",
        "EGL/egl_display.cpp",
        "EGL/egl_object.cpp",
        "EGL/egl_object.cpp",
        "EGL/egl_layers.cpp",
        "EGL/egl_layers.cpp",
@@ -205,6 +205,11 @@ cc_test {
    srcs: [
    srcs: [
        "EGL/BlobCache.cpp",
        "EGL/BlobCache.cpp",
        "EGL/BlobCache_test.cpp",
        "EGL/BlobCache_test.cpp",
        "EGL/MultifileBlobCache.cpp",
        "EGL/MultifileBlobCache_test.cpp",
    ],
    shared_libs: [
        "libutils",
    ],
    ],
}
}


Loading