Replay Mod (Fabric & Forge)

Replay Mod (Fabric & Forge)

787k Downloads

Unreasonable amount of memory used

Youmiel opened this issue · 2 comments

commented

The client took too much JVM memory when I was working on my replay recordings. Sometimes the client would encounter an OutOfMemory Error after several loads.


Ways to Reproduce

  1. Launch Minecraft client with replay mod(with profiler is better).
  2. Prepare some replay recordings, long-term recordings(for example, over 1h time-elapse recordings) are better for reproducing this issue.
  3. Load, drag the timeline and exit replay repeatedly.
  4. The memory occupation goes up, the client will become laggy or encounter a OutOfMemory Error.
  5. With JProfiler, it shows that the instances of com.replaymod.replaystudio.util.Location, java.util.TreeMap$Entry and java.lang.Long taked most of the memory in JVM(with -Xmx4G)

    At start:

    1
    After several loads:

    2



    System Details
    Minecraft Version: 1.16.5
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 11.0.2, Oracle Corporation
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation
    JVM Memory up to 4062MB



    Mod List
    [email protected]
    [email protected]+1.16
    [email protected]
    [email protected]+1.16.1
    [email protected]
    [email protected]
    [email protected]
    [email protected]
    OptiFine_1.16.5_HD_U_G7

I'm just a gamer and a beginner in Java, that's all the informations I can give.
commented

Cannot reproduce with latest version of Replay. However, I would reopen this issue if the same problem happens again.

commented

For “just a gamer”, you’re a lot more knowledgeable than others I know. I think those classes that take up the most amount of memory are badly optimised (or the ones that run it), but I don’t know because I haven’t read the source code yet.