Repository navigation
Commit a915bdc
committed
PHPStan Pro: analyse the files changed while an analysis runs once it ends
Files were not watched during an analysis, so an edit made while it ran
was noticed only after it ended, by the next poll.
They are watched during an analysis now, and the code shown follows them
right away. Once they settle, the analysis in progress is left to finish
- what it saves to the result cache makes the next one cheaper - and one
more starts when it ends, for everything that changed meanwhile. One
worker at a time writes the result cache.
Stopping the analysis in progress instead was tried, on the Laravel
framework with edits overlapping analyses: about the same time until the
final result, but 35-40 % more CPU, because each stopped analysis is
thrown away. Only while the API of a widely used class kept changing was
stopping faster, by 3 s of 14 s. Cancelling the worker never stopped it
anyway - terminating the process terminated the shell running its
command - and is removed.
Amp-Thread-ID: https://ampcode.com/threads/T-01a1a533-a2c5-7581-b58e-fb459c136c671 parent 0f02c24 commit a915bdc
3 files changed
Lines changed: 22 additions & 52 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| |||
73 | 72 | | |
74 | 73 | | |
75 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| |||
188 | 190 | | |
189 | 191 | | |
190 | 192 | | |
| 193 | + | |
| 194 | + | |
191 | 195 | | |
192 | | - | |
193 | | - | |
| 196 | + | |
| 197 | + | |
194 | 198 | | |
195 | 199 | | |
196 | 200 | | |
| |||
424 | 428 | | |
425 | 429 | | |
426 | 430 | | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
| |||
506 | 506 | | |
507 | 507 | | |
508 | 508 | | |
509 | | - | |
510 | | - | |
| 509 | + | |
511 | 510 | | |
512 | | - | |
513 | | - | |
| 511 | + | |
514 | 512 | | |
515 | 513 | | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | 514 | | |
521 | 515 | | |
522 | 516 | | |
| |||
535 | 529 | | |
536 | 530 | | |
537 | 531 | | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
538 | 540 | | |
539 | 541 | | |
540 | 542 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 25 | | |
31 | 26 | | |
32 | | - | |
33 | | - | |
34 | | - | |
| 27 | + | |
35 | 28 | | |
36 | 29 | | |
37 | 30 | | |
| |||
48 | 41 | | |
49 | 42 | | |
50 | 43 | | |
51 | | - | |
| 44 | + | |
52 | 45 | | |
53 | 46 | | |
54 | 47 | | |
55 | | - | |
| 48 | + | |
56 | 49 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 50 | + | |
63 | 51 | | |
64 | 52 | | |
65 | 53 | | |
| |||
84 | 72 | | |
85 | 73 | | |
86 | 74 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | 75 | | |
0 commit comments