Details
-
Improvement
-
Resolution: Unresolved
-
Neutral
-
None
-
None
-
None
Description
Problem
EhCache3Factory wraps the EhCache instances into Magnolia adapter abstractions
- accessed on every request
- doesn't cache the wrappers
- wrapper c-tor eventually instantiates couple of thousand mutexes (just an expensive operation)
As it can be seen on the picture below - the problem is triggered by the SiteAwareCacheFilter implementation which dynamically resolves the page cache.
(cc rkovarik - can you pls help understand how locking will even work in this situation - each request will seem to get its own blocking cache wrapper around EhCache and -> own set of locks... or not?)
!https://s3-us-west-2.amazonaws.com/secure.notion-static.com/0084f036-d821-4307-a3d5-dfc7b9ae923e/Untitled.png(https://s3-us-west-2.amazonaws.com/secure.notion-static.com/0084f036-d821-4307-a3d5-dfc7b9ae923e/Untitled.png)
The problematic
Solution
Cache the wrappers (it is after all only several of them and they typically don't change)
Checklists
Attachments
Issue Links
- relates to
-
MAGNOLIA-9051 Improve cache performance on public instances
-
- Open
-