capistrano / rvm

MIT License
140 stars 47 forks source link

suppress this constant RVM checks if QUIET environment variables is set. #42

Closed bretweinraub closed 10 years ago

bretweinraub commented 10 years ago

latest versions of capistrano are so slow that these redundant checks add lots of time to deploys and are only necessary for debugging.

maybe there's a more cap-fu way to suppress them; but for me they run for every deploy and invoke target.

it doesn't help that EACH cap execute command run in its own sshkit session .... grind, wait, yawn.

kirs commented 10 years ago

it doesn't help that EACH cap execute command run in its own sshkit session .... grind, wait, yawn.

It was improved on SSHKit 1.3 and now it has connection pool. Did you try it?

It's a good idea to skip some rvm checks, but I don't think that ENV['QUIET'] is meaningful.

Kriechi commented 10 years ago

Maybe just do the checks if loglevel == :debug?

bretweinraub commented 10 years ago

I like the loglevel idea. Couldn't find a single shred of documentation on how to set it.

But it is fact set via this in your deploy.rb

set :log_level, :info

bretweinraub commented 10 years ago

? Maybe just do the checks if loglevel == :debug?

ok done

  if fetch(:log_level) == :debug
    puts capture(:rvm, "version")
    puts capture(:rvm, "current")
    puts capture(:ruby, "--version")
  end
bretweinraub commented 10 years ago

In my environment, this save 4.1 seconds off my deploy.

penso commented 10 years ago

Saving 3sec easy here too, that should definitely be a log level variable.

pangratz commented 10 years ago

Stumbled upon this today. This would be very useful being in master.

kirs commented 10 years ago

Thanks!

bretweinraub commented 10 years ago

Yes!