4 ms·
There have been numerous posts stating that Gulp is faster than Grunt. However, the "faster" argument needs to be qualified with "under these conditions ____".
by akbar501 13y ago
There have been numerous posts stating that Gulp is faster than Grunt. However, the "faster" argument needs to be qualified with "under these conditions ____". Even better, here's my configuration. Here's the processing time of x and of y.
With JavaScript builds in particular, it's important to separate when the task running is used. At least in my workflow, I have two distinct times:
1. Development time
2. Build time
"Development time" is when the task runner is used during development, such as running livereload to update the app with saved changes to source files. Speed during development time is very important.
"Build time" is the time used when building a production package. With build time, if one task runner is 5 sec. vs. 10 sec. it makes little difference.
Is one task runner always faster?
What are the differences in performance?
And are these development time or build time differences?
I'm all for new tooling, but let's have measurements in place so that people can make intelligent decisions about when one vs the other is right/wrong for a given project.
As for configuration complexity, it would be great to see a large production configuration of Grunt and Gulp.
- lowboy 13y agoI've used Grunt for most projects in the last year, and just tried Gulp for my newest. Gulp seems snappier overall to me for tasks that watch a source directory with coffeescript or sass files in it. Maybe it's grunt-watch vs gulp.watch(). I think Grunt touches the filesystem more than Gulp which could potentially be a bottleneck. The creator (IIRC) of Gulp made a slideshow[0] . Here's an example Gruntfile[1] generated with Yeoman and generator-angular. And a Gulpfile[2] which does fewer things (no production build yet). [0]: http://slid.es/contra/gulp http://slid.es/contra/gulp [1]: https://github.com/jjt/dramsy/blob/master/client/Gruntfile.js https://github.com/jjt/dramsy/blob/master/client/Gruntfile.j... [2]: https://github.com/jjt/LUXTRUBUK/blob/master/gulpfile.js https://github.com/jjt/LUXTRUBUK/blob/master/gulpfile.js
- tomByrer 13y agoIf you want to compare build time, it would be best to add plug-ins that trigger only the tasks that deal with changed files: https://github.com/osteele/grunt-update https://github.com/osteele/grunt-update https://github.com/goodeggs/grunt-skippy https://github.com/goodeggs/grunt-skippy https://github.com/aioutecism/grunt-diff https://github.com/aioutecism/grunt-diff https://github.com/sindresorhus/gulp-changed https://github.com/sindresorhus/gulp-changed
- contrahax 13y agogulp is always going to be faster than grunt as long as grunt writes temporary files to disk. Using 3 plugins processing 20 files as an example: grunt will do 60 reads, 60 writes while gulp will do 20 reads, 20 writes