Commit 02ca21f
committed
Add --no-ui flag to server command to reduce idle CPU usage (#824)
Gradio's internal queue and polling mechanism runs continuously even
when the server is idle, causing constant ~7% CPU usage. The new
--no-ui flag skips mounting the Gradio interface and runs the FastAPI
app directly, bringing idle CPU back to near 0%.1 parent 5e10e9b commit 02ca21f
2 files changed
Lines changed: 21 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
187 | 193 | | |
188 | 194 | | |
189 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
59 | 66 | | |
60 | 67 | | |
61 | 68 | | |
| |||
323 | 330 | | |
324 | 331 | | |
325 | 332 | | |
326 | | - | |
327 | | - | |
328 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
329 | 337 | | |
330 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
0 commit comments