Commit d566dbd
authored
Improve performance of rebuilds (#16283)
This PR introduces a performance improvement we noticed while working on
on: #16211
We noticed that `substituteFunctions` was being called on every `node`
after the `compileAstNodes` was done. However, the `compileAstNodes` is
heavily cached.
By moving the `substituteFunctions` we into the cached `compileAstNodes`
we sped up performance for Catalyst rebuilds from ~15ms to ~10ms.
| Before | After |
| --- | --- |
| <img width="710" alt="image"
src="https://github.com/user-attachments/assets/eaf110d9-2f88-447c-9b10-c77d47bd99a5"
/> | <img width="696" alt="image"
src="https://github.com/user-attachments/assets/c5a2ff4c-d75e-4e35-a2b6-d896598810f5"
/> |1 parent 837e240 commit d566dbd
2 files changed
+22
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | 57 | | |
75 | 58 | | |
76 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
47 | 66 | | |
48 | 67 | | |
49 | 68 | | |
| |||
0 commit comments