Add an APCu classloader with a single entry

Created on 12 April 2016, about 8 years ago
Updated 17 February 2023, over 1 year ago

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.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Needs work

Version

10.1 ✨

Component
CacheΒ  β†’

Last updated about 2 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom catch

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

  • needs profiling

    It may affect performance, and thus requires in-depth technical reviews and profiling.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024