cloudflare / cloudflare/workers-sdk

esbuild using non-negligible CPU time when nothing is happening

Open
#11,469 7 comments 3 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.5k
Forks
1.5k
Avg merge
3d 8h
Merged PRs (30d)
187

Description

### What versions & operating system are you using?

```
System:
OS: Linux 6.14 Ubuntu 24.04.3 LTS 24.04.3 LTS (Noble Numbat)
CPU: (88) x64 Intel(R) Xeon(R) w9-3575X
Memory: 202.60 GB / 250.93 GB
Container: Yes
Shell: 5.2.21 - /bin/bash
Binaries:
Node: 22.13.0 - /home/kenton/.volta/tools/image/node/22.13.0/bin/node
npm: 10.9.2 - /home/kenton/.volta/tools/image/node/22.13.0/bin/npm
pnpm: 10.22.0 - /home/kenton/.volta/bin/pnpm
npmPackages:
wrangler: ^4.50.0 => 4.50.0
```

### Please provide a link to a minimal reproduction

N/A

### Describe the Bug

When `wrangler dev` is running, but no changes are being made, I often catch `esbuild` using 5%-25% CPU. Why is `esbuild` even running when there are no changes?

### Please provide any relevant error logs

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the `wrangler dev` entry point and observe the `esbuild` process while no files change. The report has no minimal reproduction, named files, or tests, so first establish a reproducible idle-CPU case; done should identify why work continues without changes and verify that idle CPU usage is reduced.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
cli, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.