gruntjs / gruntjs/grunt

Show warning when loadTask takes too long.

Open
#1,018 1 comment 0 reactions 0 assignees View on GitHub
Component: CLI Type: Enhancement
Dominant language
JavaScript
Stars
12.2k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

grunt --help and cli works only well if the lookup for all available tasks is done within a comfortable 100ms. (different for every developer. I am just assuming some time here) Unfortunately even registering some tasks takes a lot longer than a second. It would be good if at least the developer would be informed that the task he is writing takes too long to load.

Since there are plenty plugins out there, it might be even better if a message would be shown to users in case a task takes longer than 10ms to load (allowing for 10 tasks to be registered in 100ms). This way the users can in turn annoy developers with bug reports if a task takes too long to load.

Of course it should better be possible to switch off the message for users on a slow machine. ;)

Contributor guide

Open the contributing guide

Research direction

Start by tracing the task lookup and registration path exercised by `grunt --help`; the issue does not name a file or test. Determine where load duration can be measured, then define warning thresholds and an opt-out for slow machines. Done means slow task loading is reported without disrupting normal CLI use.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.