mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-02 07:22:42 +01:00
e8b47b7b1c
TNESt3::GetPF() and the relays it steps (TPrzekladnik, TRapid, TPrzekCiagly, TPrzekED ::Update) read the same pressures several times through virtual P() calls: TRura::P() passes the call on down the chain of relays to the cylinder. A reservoir's pressure (Vol / Cap) changes only in Act() and CreatePress(); Flow() only adds to the pending change. So between two reads with only Flow() calls in between the value is the same, and it's read once now: - GetPF(): the cylinder pressure after the two Flow() calls of the release/apply is BCP, read at the start (CheckState() can recreate the pressure of ValveRes only, which isn't in the relay chain); CVs(BCP) was worked out twice with nothing but Flow() calls between, now once. - the relays: their own P() read once instead of up to four times, TPrzekED's Next->P() once. The arithmetic and its order are unchanged. Tomaszewo (raj40821) 600 s in --test, seed 12345: GetPF was 2.9% of the main thread (inclusive) before the series; sim 275.3 s in one run against 259.7 s (median of 3, 255.0-271.3) the step before: no gain beyond the run-to-run spread (about +-5%) shows in the run time. The 14 physics logs and the event log are byte-identical, unit tests 1205/1205 with exact golden traces.