minor LodQuadTree optimization
This commit is contained in:
@@ -185,7 +185,13 @@ public class LodQuadTree extends QuadTree<LodRenderSection> implements IDebugRen
|
|||||||
this.enabledRenderSectionLock.lock();
|
this.enabledRenderSectionLock.lock();
|
||||||
|
|
||||||
tempProcessNodeList.clear();
|
tempProcessNodeList.clear();
|
||||||
tempProcessNodeList.addAll(this.enabledSections);
|
|
||||||
|
// manual add and loop to reduce GC pressure due to addAll() doing unnecessary
|
||||||
|
// array copies
|
||||||
|
for (int i = 0; i < this.enabledSections.size(); i++)
|
||||||
|
{
|
||||||
|
tempProcessNodeList.add(this.enabledSections.get(i));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user