Commit e0c2e2a
authored
perf(turbopack): Use rayon threadpool for
### What?
Run `minify()` on the `rayon` threadpool instead of the `tokio` threadpool.
### Why?
ES minification is a very CPU-intensive operation, and more importantly, it calls `rayon` internally anyway. So it's better to run it from the rayon thread pool from the start.
It seems like this PR makes the total build ~ 3% faster, at the cost of a small RSS increase.
x-ref: Numbers at
https://vercel.slack.com/archives/C06PPGZ0FD3/p1747349799503749?thread_ts=1747349784.352809&cid=C06PPGZ0FD3minify() (vercel#79261)1 parent 13af7b5 commit e0c2e2a
6 files changed
Lines changed: 19 additions & 6 deletions
File tree
- turbopack/crates
- turbopack-browser/src/ecmascript
- evaluate
- turbopack-ecmascript
- src
- turbopack-nodejs/src/ecmascript/node
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
35 | 46 | | |
36 | 47 | | |
37 | 48 | | |
| |||
139 | 150 | | |
140 | 151 | | |
141 | 152 | | |
142 | | - | |
143 | | - | |
| 153 | + | |
| 154 | + | |
144 | 155 | | |
145 | 156 | | |
146 | 157 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
0 commit comments