Skip to content

[Cache] Does an ArrayAdapter at the top of the cache chain improve performance? #27119

@backbone87

Description

@backbone87

https://stackoverflow.com/a/27393049

Each cache retrieval for the same key returns (in case of an object value) a new instance of the cache value. There are some components that repeatedly access the same cache key (mainly the metadata/annotation using components like validator/serializer/property access).

I wonder if an ArrayAdapter (with no serialization behavior) on top of the chain would improve performance (to a somewhat meaningful degree)? Ofc its a tradeoff between memory and cpu usage, since you keep the reference for the rest of the script runtime. So insteadof fetch, memcopy (in case of apcu), gc, refetch, memcopy we would get just one one memcopy and keep the object referenced in the ArrayAdapter.

If this has already been checked, just close.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions