Commit 9157094
committed
bug symfony#61653 [Routing] Don't rebuild cache when controller action body changes (HypeMC)
This PR was submitted for the 7.4 branch but it was merged into the 7.3 branch instead.
Discussion
----------
[Routing] Don't rebuild cache when controller action body changes
| Q | A
| ------------- | ---
| Branch? | 7.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | -
| License | MIT
Currently, whenever the body of a controller action that uses attributes for routing is changed, the router cache is rebuilt. This can get a little annoying when you have many routes, as the rebuild time becomes noticeable, in my case, over 2 seconds.
This PR switches to using `ReflectionClassResource` and `GlobResource` to prevent the cache from being rebuilt unnecessarily.
I'm not sure how best to test this, or if there's even anything to test. Any suggestions would be appreciated.
Commits
-------
f2b9eac [Routing] Don't rebuild cache when controller action body changesFile tree
3 files changed
+6
-6
lines changed- src/Symfony/Component/Routing/Loader
3 files changed
+6
-6
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
0 commit comments