With Grunt
, when you are registering tasks, how much slower is it to use tasks you already registered, maybe with several subtasks of their own, versus using tasks straight from initConfig
, or even writing the functions by hand in the registration? Here's an example:
How much slower would specifying grunt minify
from the command line be here:
grunt.registerTask('minify', ['preprocessed', 'nonprocessed']);
gruntregisterTask('preprocessed', ['sass:convert', 'haml:convert']);
grunt.registerTask('nonprocessed', ['uglify', 'cssmin', 'htmlmin', 'phpmin']);
than if you created the minify
task like this:
grunt.registerTask('minify', ['sass:convert', 'haml:convert', 'uglify', 'cssmin', 'htmlmin', 'phpmin']);
I have to believe there is at least some slowdown, as Grunt
has to go through more steps to "see" the tasks at each level of abstraction, but I just want to know if it's something to worry about only with thousands of modules, tens of sub-tasks per task, etc. or if it'll affect smaller projects as well.