Optimization of op-env's Write Operations #193
Labels
Any Idea
Any problem/ideas/suggestions
cyfs-base
Functions and components in cyfs-base project
cyfs-lib
Functions and components in cyfs-lib project
feature
New feature
Performance
about performance issues
The current cache hierarchy structure of op-env is as follows:
Each op-env has its memory cache for caching all modified object-map objects. As described in #159, all write operations in op-env currently use the copy-on-write strategy, resulting in a large number of temporary object-map intermediate objects during consecutive writes. These objects are stored in the op-env-cache.
Upon closer examination, is the copy-on-write strategy necessary for a op-env? Since the cache is exclusive for each op-env, an object-map that needs modification will be loaded in the order of noc -> object-map-root-cache -> op-env-cache. Once it reaches the op-env-cache, it becomes exclusive to the current op-env, so it can be directly modified in a mutable form on the object-map.
If this optimization is implemented, it would significantly improve the performance of a large number of write operations for a single op-env.
The text was updated successfully, but these errors were encountered: