Page MenuHomeWildfire Games

Wind speed computation speed-up
ClosedPublic

Authored by wraitii on Dec 30 2018, 6:28 PM.

Details

Summary

A followup patch to D78 and D359: speed up the wind computations for water.

Test Plan

Compile, review water maps.

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
temp
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 8864
Build 14540: Vulcan BuildJenkins
Build 14539: arc lint + arc unit

Event Timeline

wraitii created this revision.Dec 30 2018, 6:28 PM
Owners added a subscriber: Restricted Owners Package.Dec 30 2018, 6:28 PM
Vulcan added a subscriber: Vulcan.Dec 30 2018, 6:30 PM

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

Link to build: https://jenkins.wildfiregames.com/job/differential/861/

wraitii updated this revision to Diff 8137.May 25 2019, 8:21 PM
wraitii edited the summary of this revision. (Show Details)

Add some comments. This is actually quite sane and works correctly (and fixes an issue on Polynesia) so I'll commit it soon-ish.

Stan added a subscriber: Stan.May 25 2019, 8:31 PM
Stan added inline comments.
source/renderer/WaterManager.cpp
1

Year.

1031

Can that happen ?

1043–1044

1.0f ?

1046–1051

Maybe it should be declared out of the scope ?

1054

Put comment on top ?

1061

spaces between operators.

1062

static_cast

Also can't you just use a normal a size_t ?

size_t m_MapSize;

1068

spaces between operators.

1069

Same here.

1074

spaces between operators.

1076

spaces between operators.

1077

Same here.

1081

can't this be 'simplified' using a ternary and a 'end' variable ?

1088

Comments start with caps.

1092–1114

missing spaces ?

1105

1.0f ?

1108

spaces between operators.

1112

Missing braces.

1131

static_cast / why the cast ?

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

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

Stan added a comment.EditedMay 26 2019, 7:09 PM

As per the discussion of today, maybe m_MapSize should be an u16

wraitii updated this revision to Diff 9335.Aug 15 2019, 10:54 AM

Clean up formatting.

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

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/382/display/redirect

Silier added a subscriber: Silier.Aug 15 2019, 10:58 AM
Silier added inline comments.
source/renderer/WaterManager.cpp
1079

comments start with capital :)

wraitii added inline comments.Aug 15 2019, 12:24 PM
source/renderer/WaterManager.cpp
1031

Yes before init.

wraitii updated this revision to Diff 9342.Aug 15 2019, 12:34 PM

emplace_back instead of push_back to avoid the braces, and init the move inline.

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

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/387/display/redirect

Stan added inline comments.Aug 15 2019, 12:58 PM
source/renderer/WaterManager.cpp
1034

Nullptr

1123

F ?

Ran some profiling, and I'm not actually sure this speeds things up. But it's still better behaviour as there are some artefacts with the existing code on e.g. Polynesia near the edges, and it's more readable imo so I'll commit anyways.

This revision was not accepted when it landed; it landed in state Needs Review.Aug 15 2019, 1:56 PM
This revision was automatically updated to reflect the committed changes.