Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Extremely high CPU usage with -w #985

@max-sixty

Description

@max-sixty
  • Task version: v3.19.1 (h1:2KMJk6mDBacSPuFxPFvlvvHJwGZtU/hN2ENZpaFqR5s=)
  • Operating System: MacOS, M1

I'm running a task with -w and seeing extremely high CPU usage every few seconds. This is the Vitals chart:

image

I thought it might be the underlying task, but I replaced the command with echo hello, and I'm seeing the same behavior. And the task is not re-running during this time (i.e. it's just waiting).

If anyone would like to fully reproduce, it's here; and then task -w test-rust
https://github.com/max-sixty/prql/tree/task-repro. Here's the link to the task to view it: https://github.com/max-sixty/prql/blob/701c4141441430f94932a780b32ce8de40b599d8/Taskfile.yml#L181-L208

I'd previously changed our docs to suggest task over watchexec, as that has some problems with ignoring files in PRQL/prql#1380. Zero stress if the repo is too big / doesn't work well with a large tree as cargo though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: watcherChanges related to the Taskfile watcher.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions