title: Gulp is taking ages to execute tasks
body: <p>I'm trying to give Gulp a try for the first time and can't figure out why is taking so long in loading packages and running tasks, about 48 seconds every time. Not sure how many packages are the average, but I think I need all of them. I've been trying to improve the performance by following some examples but I'm stuck in the same place.<br>
  I'd really appreciate any piece of advice!<br>
  This is my <strong>gulpfile.js</strong>:</p>
  
  <pre><code>            var gulp = require('gulp'),
              runSequence = require('run-sequence'),
              templateCache = require('gulp-angular-templatecache'),
              sass = require('gulp-sass'),
              autoprefixer = require('gulp-autoprefixer'),
              rename = require("gulp-rename")
              browserify = require('browserify'),
              concat = require('gulp-concat'),
              addStream = require('add-stream'),
              source = require('vinyl-source-stream'),
              buffer = require('vinyl-buffer'),
              imagemin = require('gulp-imagemin'),
              browserSync = require('browser-sync'),
              reload = browserSync.reload,
              ngAnnotate = require('gulp-ng-annotate'),
              uglify = require('gulp-uglify'),
              jshint = require('gulp-jshint'),
              htmlmin = require('gulp-html-minifier'),
              del = require('del');
  
  
              function templates() {
                  return gulp.src('./app/views/**/*.html')
                      .pipe(templateCache({
                                  module: 'portfolio'
                              }));
              }
  
              gulp.task('clean:dist', function() {
                return del.sync('dist/assets/');
              });
  
              gulp.task('jshint', function() {
                   return gulp.src('./app/js/**/*.js')
                      .pipe(jshint())
                      .pipe(jshint.reporter('default'))
              });
  
              gulp.task('browserify', function() { 
  
                      return  browserify('./app/app.js')
                      .bundle()
                      .pipe(source('main.js'))
                      .pipe(buffer())
                      .pipe(ngAnnotate())
                      .pipe(addStream.obj(templates()))
                      .pipe(concat('main.js'))
                      .pipe(uglify())
                      .pipe(rename({ suffix: '.min' }))
                      .pipe(gulp.dest('./dist/assets/js/'))
              });
  
              gulp.task('sass', function() {
                  return gulp.src('./app/css/main.scss')
                      .pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
                      .pipe(autoprefixer())
                      .pipe(rename({ suffix: '.min' }))
                      .pipe(gulp.dest('./dist/assets/css'))
              });
  
              gulp.task('images', function() {
                  return gulp.src('./app/img/**/*.{png,jpg,gif,svg}')
                  .pipe(imagemin({ optimizationLevel: 3, progressive: true, interlaced: true }))
                  .pipe(gulp.dest('./dist/assets/img'))
              });
  
              gulp.task('copyfonts', function() {
                 gulp.src('./app/css/fonts/**/*.*')
                 .pipe(gulp.dest('./dist/assets/fonts'));
              });
  
              gulp.task('copy-index-html', function() {
                  gulp.src('./app/index.html')
                  .pipe(htmlmin({collapseWhitespace: true}))
                  .pipe(gulp.dest('./dist'));
              });
  
              gulp.task('serve', function() {
                  browserSync({
                      server: {
                          baseDir: './dist'
                      }
                  });
  
                  gulp.watch('app/js/**/*.js', ['browserify', reload]);
                  gulp.watch('app/css/**/*.scss', ['sass', reload]);
                  gulp.watch('app/views/**/*.html', [reload]);
              });
  
              gulp.task('bs-reload', function () {
                  browserSync.reload();
              });
  
              gulp.task('default', function(callback) {
                runSequence('clean:dist',  'jshint', ['browserify', 'sass', 'images','copy-index-html','copyfonts'], 'serve', callback);
              });
  </code></pre>
  
  <p><a href="http://i.stack.imgur.com/fJIk4.jpg" rel="nofollow">Gulp performance (image link)</a></p>