Page MenuHomeWildfire Games

Subscribe to RenderSubmit dynamically, since it is only needed for the debug overlay.
AbandonedPublic

Authored by leper on May 8 2017, 6:10 AM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Test Plan

Make sure this doesn't cause an OOS (it shouldn't, but better safe than sorry).

If someone is really bored and has a long replay one could figure out how much performance one can gain
by not doing a function call that just returns.

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
dynamic_subscription
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 1557
Build 2459: Vulcan BuildJenkins
Build 2458: arc lint + arc unit

Event Timeline

leper created this revision.May 8 2017, 6:10 AM

This might actually OOS unless the command to set debug overlays is synchronised, I'll check.

Performance wise, on my computer I had measured (very imprecisely) about 0.2µs overhead for sending a message, which with enough entities could become 1ms or so. Won't be significant but will help anyhow.

In D454#18423, @wraitii wrote:

This might actually OOS unless the command to set debug overlays is synchronised, I'll check.+

Since rendering shouldn't change state (I sort of consider that not being const a small issue, but I'll not employ mutable to hack around this, and not storing mostly unchanged data seems wasteful) and since this is a debug option (and part of the simulation, so it shouldn't be changed in non-synchronized ways) I think it works, but please do check this. I'm putting this here because someone else might catch some issue.

Performance wise, on my computer I had measured (very imprecisely) about 0.2µs overhead for sending a message, which with enough entities could become 1ms or so. Won't be significant but will help anyhow.

This is a system component, so unlikely to result in lots of messages. But not doing pointless work is not doing pointless work, so there's that.

Vulcan added a subscriber: Vulcan.May 8 2017, 8:12 PM

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!

http://jw:8080/job/phabricator/1082/ for more details.

I'd need a RL test but this is not synchronised as far as I can tell, so it would OOS on a full hash I suppose (not familiar with how we handle OOS in MP).

This is a system component, so unlikely to result in lots of messages. But not doing pointless work is not doing pointless work, so there's that.

Ah right, brainfart :p

I tried some games in sp, mp with rejoin, with -serializationtest playing with overlay lines and didn't get oos.
That's not a proof and I have no real knowledge about those things.

leper abandoned this revision.Dec 19 2017, 6:42 PM

I guess the RL test isn't going to happen, and me caring to update this in case someone actually gets around to check this also isn't.