Commit a0a95fc
committed
Run reload in a background thread to keep the server responsive
On large Rails apps (e.g., Bourgeois), reload takes 10-20 seconds.
During that time, the server can't process any other requests (model
info, route info, associations), causing the editor to freeze.
Run reload in a background thread and respond immediately. If another
reload arrives while one is in progress, skip it — the running reload
will pick up all file changes. This prevents N rapid saves from causing
N sequential 20-second reloads.
Trade-off: DSL generation may run against slightly stale state if it
starts before reload finishes. This is mitigated by the "don't delete
RBI" fix in Tapioca which preserves existing RBIs for missing constants.
Related: Shopify/team-ruby-dx#17341 parent ca012cd commit a0a95fc
1 file changed
Lines changed: 13 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
332 | 336 | | |
333 | 337 | | |
334 | 338 | | |
| |||
0 commit comments