Commit 1853dac
Avoid Object2LongMap.Entry allocations (#8362)
Small tweaks to reduce the number of entries that get allocated on each
server tick when updating the cached stacks.
A number of remaining allocations here appear to be from
https://github.com/AppliedEnergistics/Applied-Energistics-2/blob/126ff28d93ffc717c9dda8a40503660165e7a4de/src/main/java/appeng/api/stacks/VariantCounter.java#L95.
Ideally that should use `Object2LongMaps.fastIterator`, but I am not
sure if doing so is safe, since I'm not familiar with the rest of the
code.
---------
Co-authored-by: shartte <shartte@users.noreply.github.com>1 parent ea12402 commit 1853dac
3 files changed
Lines changed: 6 additions & 5 deletions
File tree
- src/main/java/appeng
- api/stacks
- me
- cells
- service
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
95 | | - | |
| 96 | + | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| |||
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
144 | | - | |
| 145 | + | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
239 | 240 | | |
240 | 241 | | |
241 | 242 | | |
242 | | - | |
| 243 | + | |
243 | 244 | | |
244 | 245 | | |
245 | 246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
131 | | - | |
| 130 | + | |
132 | 131 | | |
133 | 132 | | |
134 | 133 | | |
| |||
0 commit comments