Problem/Motivation
ParagraphsBehaviorCollection::getEnabled instantiates every defined behavior, just to get the enabled ones.
Inclusive Wall Time: 715,543 µs => 93,134 µs
Before

After

This is on a site with layout_paragraphs enabled. The node has 240 paragraphs, hence the high call count.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| Bildschirmfoto 2026-06-19 um 13.27.16.png | 165.18 KB | webflo | |
| Bildschirmfoto 2026-06-19 um 13.27.00.png | 182.61 KB | webflo |
Issue fork paragraphs-3604178
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
webflo commentedComment #4
berdirJust saw this pop up as well, if not with that many calls. That's a lot of paragraphs?
I think what should also help here is enable static caching on paragraph types, then we have fewer instances of them and they can share the plugin instances. But I'll need to fix tests first to ensure nothing breaks with that.
Comment #6
berdirMerged. You might want to test the impact of #3608381: Enable static caching on paragraph types as well.