- Issue created by @larowlan
Added Performance tag and related to π± Reduce memory/cpu/io cost of attribute discovery Active .
- π¬π§United Kingdom catch
Had 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)
HEAD:
[notice] Performed install task: install_finished [11.77 sec, 252.87 MB]
MR:
[notice] Performed install task: install_finished [10.4 sec, 44.81 MB]
MR from π Add the ability to install multiple modules and only do a single container rebuild to ModuleInstaller Active
[notice] Performed install task: install_finished [6.7 sec, 70.91 MB]
Combining the two issues:
[notice] Performed install task: install_finished [6.13 sec, 40.29 MB]
Just for kicks, adding π Remove the automatic cron run from the installer Needs work on top (i.e. the three issues combined).
[notice] Performed install task: install_finished [4.56 sec, 34.31 MB]
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.
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. - π¨π¦Canada Charlie ChX Negyesi πCanada
This 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 π Cache bin names should be set from service tags, not the service name Needs work and π Replace lazy service proxy generation with service closures Active 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.
- Merge request !10489Reset the container when modules are installed, but only in the installer. β (Open) created by catch
- Merge request !10490Reset the container in InstallerKernel to avoid memory leak. β (Open) created by longwave
- π¬π§United Kingdom alexpott πͺπΊπ
alexpott β changed the visibility of the branch 3492453-hacky-version to hidden.
- π¬π§United Kingdom alexpott πͺπΊπ
alexpott β changed the visibility of the branch 3492453-memory-leak-in to hidden.
- π¬π§United Kingdom alexpott πͺπΊπ
This looks like a pragmatic fix for 11.1 and we can fix this better in follow-ups and π Add the ability to install multiple modules and only do a single container rebuild to ModuleInstaller Active
- π¬π§United Kingdom catch
Committed/pushed to 11.x and cherry-picked to 11.1.x, thanks!
Automatically closed - issue fixed for 2 weeks with no activity.