mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 02:55:50 +00:00
The existing trust line caching code was suboptimal in that it stored redundant information, pinned SLEs into memory and required multiple memory allocations per cached object. This commit eliminates redundant data, reducing the size of cached objects and unpinning SLEs from memory, and uses value_types to avoid the need for `std::shared_ptr`. As a result of these changes, the effective size of a cached object, includes the overhead of the memory allocator and the `std::shared_ptr` should be reduced by at least 64 bytes. This is significant, as there can easily be tens of millions of these objects.