-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$this->kernel->invalidateContainer(); increases Drush/Drupal bootstrap by 300% #2658
Comments
Thanks for working on speeding up Drush. Could you submit a PR and see if tests still pass? |
I'm not sure is it ok to just roll it back because there was a whole commit dedicated to exactly this change (though it doesn't seem to be logged here on github):
Then in the So the patch is actually simple. I'd prefer asking @greg-1-anderson about the reason and is it appropriate to roll the change back? |
I don't remember exactly what the reasoning was here, but without
I guess Drush 8 doesn't do this because it isn't trying to add services to the container. Maybe there is some other way we could do this. Drupal Console makes heavy use of services; there might be some info to glean there. |
@OnkelTem If you could help get our tests to pass without the invalidateContainer() call it would be much appreciated. |
@weitzman Ok, I'll try to figure it out today. |
@greg-1-anderson I get the same when trying to run drush 8.1.11 from /usr/local/src/...
Bug is gone when reverting to 8.1.10 |
Got exactly the same message as develCuy with drush 8.1.11 when I run |
Hello,
I can't progress anymore on my project, anybody have find a fix ? Thanks for your help. |
…-ops#2663) # Conflicts: # lib/Drush/Drupal/DrushServiceModfier.php # lib/Drush/Drupal/DrushServiceModifier.php # src/Drupal/DrushServiceModfier.php
I was debugging Drush 8.1.10 bootstrap to figure out why it works slower then before even on basic operations like
drush status
and came up to the reason. Now before Drush starts Drupal kernel in \Drush\Boot\DrupalBoot8::bootstrap_drupal_full it invalidates the container making Drupal to build it from scratch.I'm sure this has been done for a good reason but I can't find appropriate issue. But one thing worries me: it is a huge makeweight to every drush run. Look, before we could use Drush w/o this invalidation and it worked just fine. Now we need to rebuild container for every even tiny operation which costs us 250-300% of execution time grow (calculated on
drush status
).So my question is: do we really needed it?
Can't it be at least OPTIONAL and enabled by some
--force-rebuild
global switch? And even without one, we can always dodrush cr
if it's really needed.The text was updated successfully, but these errors were encountered: