Closed (fixed)
Project:
Drupal core
Version:
11.1.x-dev
Component:
base system
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Dec 2024 at 02:16 UTC
Updated:
23 Dec 2024 at 12:49 UTC
Jump to comment: Most recent
Comments
Comment #3
larowlan.
Comment #4
godotislateAdded Performance tag and related to #3492233: [meta] Reduce memory/cpu/io cost of attribute discovery.
Comment #5
catchHad a feeling this might be one of the problems but didn't know where to start on fixing it. Turns out it's https://git.drupalcode.org/project/drupal/-/merge_requests/10486/diffs?f...
What a one-liner!
Did some quick testing.
drush si -vvv (standard profile)
10.4 HEAD:
HEAD:
MR:
MR from #3416522: Add the ability to install multiple modules and only do a single container rebuild to ModuleInstaller
Combining the two issues:
Just for kicks, adding #2422681: Remove the automatic cron run from the installer on top (i.e. the three issues combined).
So this fixes the vast majority of the memory leaks during install, but if we also do multi module install and remove the cron run, we can reduce memory usage by a further 25% - roughly 5mb for multi install and 5mb dropping cron, and install time goes down by nearly 2/3rds overall too. It only gets us back to 10.4 speeds but we know the OOP hooks bc layer is very expensive and there are other issues to hopefully continue optimising that.
Installing Umami via drush complains a lot for me with
[warning] The "field_block:node:page:field_body" block plugin was not found [7.12 sec, 69.44 MB]but that also happens in HEAD.Comment #6
ghost of drupal pastThis is absolutely amazing work.
For follow up, definitely not to hold this one up: Can we remove the container from services? I guess that's a big meta. There's #3272093: Cache bin names should be set from service tags, not the service name and #3483996: Remove lazy declaration and proxy class for cron and use service closure instead and then there's the KeyValueFactory and LazyContextRepository and there's an unused container.trait service and ... Anyways it'd be nice to untangle the resulting circular dependencies.
Comment #7
longwaveComment #10
longwaveComment #13
alexpottThis looks like a pragmatic fix for 11.1 and we can fix this better in follow-ups and #3416522: Add the ability to install multiple modules and only do a single container rebuild to ModuleInstaller
Comment #14
alexpottComment #15
alexpottComment #18
catchCommitted/pushed to 11.x and cherry-picked to 11.1.x, thanks!