summaryrefslogtreecommitdiff
path: root/view/sharedcache/api/python/sharedcache_enums.py
diff options
context:
space:
mode:
authorMark Rowe <mrowe@bdash.net.nz>2025-01-13 23:36:24 -0800
committerMason Reed <mason@vector35.com>2025-04-02 05:36:54 -0400
commitc8b6ae27e7c4f379278831b5b5cfc57863233f00 (patch)
tree19ecff4e4a15a1c9dcc58b9cf30c2e7741560645 /view/sharedcache/api/python/sharedcache_enums.py
parentc1cf836de9ae7ec55a131f2ca48756a4a4e9a447 (diff)
[SharedCache] Optimize parsing of slide info
Slide info is parsed and applied on the main thread, below the `SharedCache` constructor, when a shared cache is opened. Time spent applying the slide is time that the main thread is blocked. These changes eliminate some unnecessary overhead so what work remains is dominated by kernel work (paging in data, copying pages when the first modification is made). The changes are: 1. Read slide pointers via `ReadULong` rather than the variable-length `Read` method. The compiler isn't able to eliminate the call to `memcpy` in the variable-length `Read` function, and the function call overhead is noticeable given the small size of the read and number of times it is called. 2. Remove the file member from `MappingInfo`. Slide info is applied for a single file at a time so there's no reason to track the file it belongs to. This removes unnecesssary reference counting on the `std::shared_ptr` that holds the `MMappedFileAccessor`.
Diffstat (limited to 'view/sharedcache/api/python/sharedcache_enums.py')
0 files changed, 0 insertions, 0 deletions