Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading tasks is still slow, how to improve it? #55

Open
themenow opened this issue Mar 19, 2018 · 0 comments
Open

Loading tasks is still slow, how to improve it? #55

themenow opened this issue Mar 19, 2018 · 0 comments

Comments

@themenow
Copy link

themenow commented Mar 19, 2018

I run a 'grunt clean:folder' for testing, with a minimal plugins installed comparing all installed

package.json before

{
  "devDependencies": {
    "grunt": "^0.4.5",
    "grunt-contrib-clean": "^1.0.0",
    "load-grunt-config": "^0.19.2",
    "jit-grunt": "^0.10.0",
    "time-grunt": "^1.4.0"
  }
}

package.json after

{
  "devDependencies": {
    "autoprefixer": "^8.1.0",
    "cssnano": "^3.10.0",
    "grunt": "^0.4.5",
    "grunt-beep": "^1.0.1",
    "grunt-cli": "^0.1.13",
    "grunt-concurrent": "^2.3.1",
    "grunt-contrib-clean": "^1.0.0",
    "grunt-contrib-compress": "^1.4.1",
    "grunt-contrib-connect": "^1.0.2",
    "grunt-contrib-copy": "^1.0.0",
    "grunt-contrib-less": "^1.0.1",
    "grunt-contrib-watch": "^1.0.0",
    "grunt-fast-watch": "^0.4.2",
    "grunt-notify": "^0.4.5",
    "grunt-postcss": "^0.9.0",
    "grunt-rename": "^0.1.4",
    "grunt-replace": "^1.0.1",
    "grunt-svn-export": "^0.1.7",
    "grunt-svninfo": "^0.1.6",
    "grunt-text-replace": "^0.4.0",
    "grunt-version": "^1.2.1",
    "grunt-wp-i18n": "^1.0.2",
    "jit-grunt": "^0.10.0",
    "load-grunt-config": "^0.19.2",
    "matchdep": "^1.0.1",
    "postcss-object-fit-images": "^1.1.2",
    "time-grunt": "^1.4.0"
  }
}

With minimal plugins

Execution Time (2018-03-19 08:01:06 UTC)
loading tasks 98ms ██████████████████████████████████████████████ 71%
loading grunt-contrib-clean 33ms ████████████████ 24%
clean:plugins_folder 6ms ███ 4%
Total 139ms

With all plugins

Execution Time (2018-03-19 08:08:14 UTC)
loading tasks 1.8s ██████████████████████████████████████████████████████████████ 96%
loading grunt-contrib-clean 44ms ██ 2%
clean:plugins_folder 23ms █ 1%
Total 1.9s

You can see the loading time is still slow, am I doing it wrong?

my gruntfile.js

module.exports = function(grunt) {
    var path = require('path');

    require('time-grunt')(grunt);
    require('jit-grunt')(grunt);

    require('load-grunt-config')(grunt, {
        configPath: path.join(process.cwd(), 'grunt'), 
        jitGrunt: {
            staticMappings: {
                replace: 'grunt-text-replace',
                makepot: 'grunt-wp-i18n',
            }
        },
    });
};

Update:


Removing "load-grunt-config" reduced the loading time to 8xx ~ 9xx ms, but still 10 times lower than the first case, is it possible to improve it further?

@themenow themenow changed the title Loading tasks is still slow, how to tell if jit-grunt is working? Loading tasks is still slow, how to improve it? Mar 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant