Problem/Motivation
Have been meaning to open this issue for years now. Latest reminder was bojanz linking to https://github.com/composer/composer/pull/5174#issuecomment-208824818
The apcu classloader from Symfony uses an entry-per-class. This means lots of sets and gets on each request. Also APCu doesn't handle LRU, or getting full very well, so it's prone to fragmentation.
Proposed resolution
Add an alternative APCu classloader which maintains a single entry. The main challenge is to avoid write-stampedes. Fetching and writing at the end of the request, in a similar way to CacheCollector would help vs. that.
Also need to be careful that the array size doesn't get ridiculous.