Repository navigation
Commit ccf5a59
committed
perf(kotlin): one fact read per file, edges only where resolved
The JVM builder reread and reparsed a Kotlin file for every fragment
and asked the resolver for the same definition once per use; the base
side of a range spawned `git show` per file and per changed definition.
Facts now come from the resolver's cache, uses are found by binary
search on line, a definition is resolved once per fragment, base reads
go through one `git cat-file --batch`, and a project lookup memoises
every directory it walks. Impact on the 35-file yay-tsa commit
31935cdd7: 3.2 s -> 1.8 s warm.
Output change: a Kotlin member use now links in the context graph only
to the definition it resolves to. A candidate (untyped receiver,
overload, dispatch) suggests in impact; it no longer adds an edge.
Claude-Session: https://claude.ai/code/session_0176zGy9cjNvwmtiRJLjDcKp1 parent 904cb30 commit ccf5a59
3 files changed
Lines changed: 61 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | 497 | | |
502 | 498 | | |
503 | 499 | | |
| |||
771 | 767 | | |
772 | 768 | | |
773 | 769 | | |
774 | | - | |
775 | | - | |
776 | | - | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
777 | 774 | | |
778 | 775 | | |
779 | 776 | | |
| |||
795 | 792 | | |
796 | 793 | | |
797 | 794 | | |
| 795 | + | |
| 796 | + | |
798 | 797 | | |
799 | | - | |
| 798 | + | |
| 799 | + | |
800 | 800 | | |
801 | 801 | | |
802 | | - | |
803 | | - | |
804 | | - | |
| 802 | + | |
| 803 | + | |
805 | 804 | | |
806 | | - | |
| 805 | + | |
807 | 806 | | |
808 | 807 | | |
809 | 808 | | |
| |||
820 | 819 | | |
821 | 820 | | |
822 | 821 | | |
823 | | - | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
824 | 828 | | |
825 | 829 | | |
826 | 830 | | |
827 | 831 | | |
828 | | - | |
829 | | - | |
| 832 | + | |
| 833 | + | |
830 | 834 | | |
831 | 835 | | |
832 | 836 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
| |||
84 | 89 | | |
85 | 90 | | |
86 | 91 | | |
| 92 | + | |
| 93 | + | |
87 | 94 | | |
88 | 95 | | |
89 | 96 | | |
| |||
120 | 127 | | |
121 | 128 | | |
122 | 129 | | |
123 | | - | |
124 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
125 | 147 | | |
126 | 148 | | |
127 | 149 | | |
| |||
147 | 169 | | |
148 | 170 | | |
149 | 171 | | |
150 | | - | |
151 | | - | |
| 172 | + | |
| 173 | + | |
152 | 174 | | |
153 | | - | |
| 175 | + | |
| 176 | + | |
154 | 177 | | |
155 | 178 | | |
156 | 179 | | |
| |||
802 | 825 | | |
803 | 826 | | |
804 | 827 | | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
809 | 831 | | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
810 | 836 | | |
811 | 837 | | |
812 | 838 | | |
| |||
821 | 847 | | |
822 | 848 | | |
823 | 849 | | |
824 | | - | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
825 | 854 | | |
826 | 855 | | |
827 | 856 | | |
| |||
0 commit comments