Skip to content

Commit 2345335

Browse files
committed
Adjust the starting capacity of the queues
1 parent 37c2b0e commit 2345335

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88

99
### Changed
1010

11-
- Stopped using `PooledLongQueue` using `LongArrayFIFOQueue` instead, should be more optimized (Lower memory usage, faster & lighter lighting updates)
11+
- Stopped using `PooledLongQueue` using `LongArrayFIFOQueue` instead, should be more optimized (faster & lighter lighting updates)
1212
- Skip spreading light neighbor checks early if the current light is lower than the neighbor light
1313
- Made minor changes to clamping (Shouldn't cause a difference)
1414

src/main/java/dev/redstudio/alfheim/lighting/LightingEngine.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,17 @@ public LightingEngine(final World world) {
109109
this.world = world;
110110
profiler = world.profiler;
111111

112-
initialBrightenings = new LongArrayFIFOQueue(128);
113-
initialDarkenings = new LongArrayFIFOQueue(128);
112+
initialBrightenings = new LongArrayFIFOQueue(16384);
113+
initialDarkenings = new LongArrayFIFOQueue(16384);
114114

115115
for (int i = 0; i < EnumSkyBlock.values().length; ++i)
116-
lightUpdateQueues[i] = new LongArrayFIFOQueue(128);
116+
lightUpdateQueues[i] = new LongArrayFIFOQueue(16384);
117117

118118
for (int i = 0; i < darkeningQueues.length; ++i)
119-
darkeningQueues[i] = new LongArrayFIFOQueue(128);
119+
darkeningQueues[i] = new LongArrayFIFOQueue(16384);
120120

121121
for (int i = 0; i < brighteningQueues.length; ++i)
122-
brighteningQueues[i] = new LongArrayFIFOQueue(128);
122+
brighteningQueues[i] = new LongArrayFIFOQueue(16384);
123123

124124
for (int i = 0; i < neighborInfos.length; ++i)
125125
neighborInfos[i] = new NeighborInfo();

0 commit comments

Comments
 (0)