Commit 94cce77
committed
fix: skip ResearchTreeScreen graph rebuild when registry is unchanged
buildGraph() was called unconditionally every 20 ticks (once per
second), performing a full teardown and reconstruction even when no
data had changed. A graphDirty flag now gates rebuilds; the flag is
only set when ResearchRegistry.size() changes (e.g. on datapack reload).1 parent e6d4af8 commit 94cce77
1 file changed
Lines changed: 10 additions & 0 deletions
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
| |||
142 | 144 | | |
143 | 145 | | |
144 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
145 | 155 | | |
146 | 156 | | |
147 | 157 | | |
| |||
0 commit comments