Skip to content

Optimize wire updates with sleep #56

@SkimnerPhi

Description

@SkimnerPhi

Currently wire buildings are updated every tick despite most buildings being purely deterministic & only changing output value when input values change. Rewriting update logic to naturally sleep buildings until the upstream networks changes signal should offer a large improvement to wires-focused saves such as TMAMs and a minor improvement to smaller MAM saves.

We can define certain buildings - the hub, levers, readers, and storage - as "emitters" that largely still update as usual. Using existing WireNetwork data structures, we can recursively call downstream networks & buildings to update only when the upstream emitter changes value. This means that wire building systems will no longer use the default update method and will have a more selective one instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceAn improvement in performance is desired

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions