InteractionVisualizer icon indicating copy to clipboard operation
InteractionVisualizer copied to clipboard

Memory leak

Open Vyacheslav73195 opened this issue 1 year ago • 1 comments

I suspect that the plugin has a memory leak, as a result of which the server is unstable and performance deteriorates dramatically. The picture shows the current memory graph, and the approximate normal behavior without the plugin is shown in red. (I can't stop the server once again to turn it off, just trust...) What can you advise in this situation? Снимок экрана (35)

Vyacheslav73195 avatar Aug 31 '24 22:08 Vyacheslav73195

And here is the RAM graph without the plugin. Minus 10 ms of tick time. Снимок экрана (36)

Vyacheslav73195 avatar Sep 03 '24 01:09 Vyacheslav73195

https://github.com/LOOHP/InteractionVisualizer/blob/815d11b9298f2709b9cd9d77aab7614180423b11/common/src/main/java/com/loohp/interactionvisualizer/managers/TileEntityManager.java#L66

It looks like it's caused by only put and not remove this Map

jhqwqmc avatar Sep 14 '25 07:09 jhqwqmc

InteractionVisualizer/common/src/main/java/com/loohp/interactionvisualizer/managers/TileEntityManager.java

Lines 65 to 66 in 815d11b

private static final Map<TileEntityType, Set<Block>> active = new EnumMap<>(TileEntityType.class); private static final Map<ChunkPosition, Set<Block>> byChunk = new HashMap<>(); It looks like it's caused by only put and not remove these two Map

I used AI tools to analyze the entire plugin code, and what you said should be fine. There was no operation to delete the saved block

NeglectDream avatar Sep 14 '25 07:09 NeglectDream

@LOOHP

Ziphyrien avatar Sep 14 '25 08:09 Ziphyrien