Skip to content

circuit-bug: Adding clocks in circuit cause full CPU usage #16

Description

@firecakes

Describe the circuit (or/and a screenshot)
I inserted a 5-tick clock circuit inside another circuit and left it alone for a bit in a SMP server. After several minutes of letting the server run the CPU usage of the server maxes out and requires a restart. Even if I remove the circuit block from the world as long as the clock is still present in one of the circuit dimensions it will cause CPU to max out. Removing the 5-tick clock circuit from all circuit blocks fixes the CPU issue.

Expected behavior
I expect it to take a minimal amount of CPU to run a clock circuit but also idk how the mod handles circuits that constantly change over time.

Environment
This link is the performance profile of the server. Viewing it as a flame graph (Right click one of the bars) you can see CircuitBoardBlock.neighborUpdate() taking up a significant percentage of the CPU.

https://spark.lucko.me/8wDejs5c2v

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcircuitUnintentional circuit behaviour

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions