Sometimes deploying to Heroku can get really slow. Obviously before spending any time trying to speed it up, you should actually know what part of it is causing the problem. For instance, if you run Ruby on Rails, you get some information regarding the asset precompilation time or for how long Bundler installed your gems.
However, if this isn’t enough, here is a small script that could help you by simply timestamping every line of the Heroku deploy log, giving you something looking like that:
Here’s the script. Note that I use a simple HH:MM:SS formating in this example, but feel free to use what makes sense depending on your setup and preferences.
Save it to a local file called “timestp” and give it write permissions:
The tricky part here is to know that git push is actually sending its output to STDERR, so you need to do:
$ git push heroku master 2>&1 | timestp
Hopefully this will help you pinpoint with more accuracy the problem in your deployment.