Page MenuHomeWildfire Games

Hierarchical pathfinder: speed up edge update (D53 outtake)
ClosedPublic

Authored by wraitii on Apr 20 2019, 9:50 AM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP22279: Hierarchical pathfinder: Speed up edge update
Summary

Speed up edge update by being clever, only updating dirty tiles instead of everything (effectively doing to "TODO be clever" here).

(D53 outtake)

Test Plan

Review code, test behaviour.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/differential/1235/display/redirect

Stan added a subscriber: Stan.Sat, Apr 27, 1:44 PM
Stan added inline comments.
source/simulation2/components/tests/test_HierPathfinder.h
73 ↗(On Diff #7779)

Unless the name is very long we shouldn't use auto https://trac.wildfiregames.com/wiki/Coding_Conventions

source/simulation2/helpers/HierarchicalPathfinder.cpp
502 ↗(On Diff #7779)

Maybe do it here in this differential to reduce the maintenance ?

737 ↗(On Diff #7779)

ternary ?

wraitii updated this revision to Diff 7901.Sat, May 4, 3:03 PM
wraitii marked 3 inline comments as done.
wraitii edited the summary of this revision. (Show Details)

Splicing further. This is solely the edge update.

I've replayed an AI 4v4 for 5 minutes on a giant map, here's the data:


Basically, on that giant map, updating edges took a minimum of 29ms, about 40ms on average, and a max of 70. Now it takes 8ms in the best case, and 25ms in the worst, with about 11 on average.

Basically this is an important speed-up.

This doesn't change hashes, passes tests, so I intend to commit it soon enough regardless of reviews (though I'm welcoming them).

wraitii retitled this revision from Hierarchical pathfinder: Implement global regions / speed up edge update (D53 outtake) to Hierarchical pathfinder: speed up edge update (D53 outtake).Sat, May 4, 3:06 PM
Vulcan added a comment.Sat, May 4, 3:10 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/1322/display/redirect

This revision was not accepted when it landed; it landed in state Needs Review.Mon, May 13, 7:02 PM
This revision was automatically updated to reflect the committed changes.