-
-
Notifications
You must be signed in to change notification settings - Fork 643
Default to Composer-based site building instead of Drush Make #699
Comments
Also worth checking how much slowdown |
did you turned off x-debug from the CLI? |
I'm curious about build times in comparison to the drupal-console and drush make methods, and the possibility of optionally switching xdebug on/off during this process... |
xdebug is by default disabled so the tests from earlier ran without it. I added a few tests in PR #700 to get some basic comparison readings with different configs. |
Before when we used working copy in the makefile the build time was 10-11min. Now it's pretty consistently ~9min. Another note, I ran
as soon as they were in my cache:
/cc @webflo is there any way we or packagist.drupal-composer.org can optimize that part? Or is it just how composer works? Edit: Found this drupal-composer/drupal-packagist#48 The shallow clones PR won't help us here. All my packages are fetched as zipballs and they download in 3sec compared to the 400sec packagist json step. |
Perfect timing! hirak/prestissimo#101 (merged 22min ago haha) With empty cache it's now down from 400s to:
|
With parellel download of packages.json files I think we can actually go forward with defaulting to composer based installs. |
Opened up a WIP PR #701 |
Well... Maybe we helped push them over the edge there :) Good thing I didn't push a tag yet! |
I don't enable it unless I explicitly need it—I'm an old-fashioned guy who normally prints/logs debug statements and I only resort to Xdebug and its ilk if needed :) By default, it's not enabled in CLI in Drupal VM. |
From my home in STL, on my laptop, using
Cachier stored about 131M of files in my cache (eesh!) |
@oxyc @geerlingguy you might also look at what is being done in https://github.com/platformsh/platformsh-example-drupal/pull/20 for some goodness. Specifically: drush/policy.drush.inc |
@heddn - So far I don't want to go so far as to make people using a drush/make-based workflow feel like it's a painful experience, so a policy file discouraging/blocking the use of |
Let's do this thing! I'm writing up a blog post with some of the learnings from here—thanks in HUGE part to @oxyc's experimentation. I think that's like 92 beers or so at this point. Sooner or later I'll just have to buy a keg. 🍻 |
@heddn that looks to be based on |
Blog post posted: http://www.jeffgeerling.com/blog/2016/speeding-composer-based-drupal-installation Please let me know if there are errors or things missing there! Let's poke and prod the community to get things even better! :) |
Great post Jeff. One item related to drupal-packagist infrastructure. drupal.org is now publishing this information for contrib modules. Once the drupal core split is available drupal.org infrastructure can be used for the composer repository. |
@joestewart - Great point! Do you think it will be set up for caching via Fastly out of the gate, or will it take some time to get that part of the drupal.org-based packagist configured and running? |
https://packages.drupal.org/8 is already backed by Fastly. I don't plan to change the infrastructure of https://packagist.drupal-composer.org/. I think its not worth the effort. I hope packages.drupal.org becomes stable in a few weeks. |
For reference here's my output of running:
https://gist.github.com/oxyc/e9a89257fd05368992b0b722a71a0604 Some notes:
|
Looks like getting packages.drupal.org up and running is going to be the biggest short-term win! |
Since we were mentioned... 😄 The disabling of pm-* commands isn't a Platform.sh thing. It's a change that was made upstream to https://github.com/drupal-composer/drupal-project about 3 months ago. We're inheriting that project and following it as closely as we can, just tweaking the result a bit to make Drupal play nicer with our read-only file system. I also just switched our installer to use packages.drupal.org today, at Mixologic's recommendation. Hopefully that will go live today or early tomorrow. |
Nice - I'd love to hear how it goes! Any issue on drupal.org I could follow for progress/updates? |
Cool I didn't understand it was up and running! That particular step decreased by 62sec by switching over to https://packages.drupal.org/8 on my laptop. Also tested how much making |
@oxyc - Can you submit a PR for it (the change to packages.drupal.org), and I'll merge once we get word upstream that it will be semi-officially or officially supported? |
Note that you'll need to change the "conflict" line to "replace" when switching to the official repos. |
Prestissimo 0.3.1 now hooks into |
Yup, not sure if the version is updated for existing boxes though. |
Background:
Drupal VM currently supports building codebases using Composer or Drush make files. We were going to default to building with
drupal-project
and/or acomposer.json
file instead of the exampledrush.make.yml
file, but some performance testing showed abysmal regressions in terms of the initial site build—and even fully cached site builds using Composer were 2x or more slower than Drush make file builds.I'd like to move to using Composer as the default, as that's kind of where the puck is going... but before that can happen, we need to continue poking and prodding at Composer and all the default setup to make sure the Composer install is not a horrendously slow user experience, especially the first time (uncached).
@oxyc did some awesome investigative work and found that there are a few things we can do out of the gates to speed things up, like:
vagrant-cachier
correctly to cache everything from Composer outside the VM so it persists across builds.prestissimo
to speed upcomposer
commands by parallelizing downloads--prefer-dist
But I'm hoping there are some other optimizations we can make to get the composer installation time down quite a bit. I know @thom8 suggested composer/composer#4961 might help by using shallow Git clones, but we definitely need hard data (benchmarks) to back up theories.
The text was updated successfully, but these errors were encountered: