Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.6, 2.4.0-beta-3
-
None
-
None
-
Patch
Description
The 5 ConcurrentHashMap's in ExpandoMetaClass are very rarely updated, and when they are, it's usually not by multiple concurrent threads. Therefore, using a lower concurrency level would result in less memory being used with no performance penalty. Since there are so many ExpandoMetaClass instances in a running application, this per instance savings is significant for a whole application.
https://www.youtube.com/watch?v=fFpBfrSVvpM talks about Twitter encountering and solving this same problem.
Documentation at http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ConcurrentHashMap.html The default level is 16 which is massive overkill for these cases.