firstandthird / load-grunt-config

Grunt plugin that lets you break up your Gruntfile config by task
firstandthird.github.io/load-grunt-config/
MIT License
374 stars 64 forks source link

Improve performance: load-grunt-config is twice slower than plain gruntfile.js #173

Open themenow opened 6 years ago

themenow commented 6 years ago

I compared two configurations by running a single task "grunt clean"

Time for loading tasks:

plain gruntfile with jit-grunt - 852ms separated config files with load-grunt-config and jitGrunt - 1.9s

At first, I thought jitGrunt didn't work, that turned out was wrong, debugging showed it did work.

However, comparing before and after using load-grunt-config to split the gruntfile.js, the performance impact is significant by double the loading time.

It may not noticeable on a powerful computer, for example, if the loading time before is 50ms, increasing to 100ms isn't a big deal. But on my computer, this adds 1 second on each task running, and sum up to additional 15+ seconds for my "build" task which has 10+ steps.