Page MenuHomeWildfire Games

Replace EntityMap, std::map, std::unordered_map and boost::unordered_map with an upgraded container
Needs ReviewPublic

Authored by wraitii on Mon, Jan 7, 7:14 PM.

Details

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

Implement a new container (really a revamped EntityMap) to replace most of our std::maps in ComponentManager.

I need to assess performance exactly as testing results have proven rather inconclusive. A short AI game (30 minutes) would indicate this is slightly faster than svn, but I'd like longer replays and more profiling. Furthermore, this might still be optimised.

This works so long as you use D1736. I've tested that the hashes are the same, and the tests have become quite extensive so I'm rather confident that it works, the question is "how fast".

Test Plan

Code review. Performance review. Gameplay profiling.

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
D8_EntityMap
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 6788
Build 11163: Vulcan BuildJenkins
Build 11162: arc lint + arc unit

Unit TestsFailed

TimeTest
0 msJenkins > cxxtest_debug.xml::[failed-to-read]
Failed to read test report file /mnt/data/jenkins-phabricator/workspace/differential/cxxtest_debug.xml org.dom4j.DocumentException: Error on line 1 of document : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog. at org.dom4j.io.SAXReader.read(SAXReader.java:482)
0 msJenkins > TestAllocators::test_da
0 msJenkins > TestAtlasObjectXML::test_parse_attributes1
0 msJenkins > TestAtlasObjectXML::test_parse_attributes2
0 msJenkins > TestAtlasObjectXML::test_parse_basic
View Full Test Results (1 Failed · 317 Passed)

Event Timeline

wraitii created this revision.Mon, Jan 7, 7:14 PM
wraitii marked 2 inline comments as done.
wraitii added inline comments.
source/simulation2/system/EntityMap.h
0

Added compared to D8.

1

Added compared to D8: this was where it crashed otherwise.

Vulcan added a subscriber: Vulcan.Mon, Jan 7, 7:35 PM

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

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

wraitii updated this revision to Diff 7340.Sun, Jan 13, 8:03 PM
wraitii retitled this revision from EntityMap rewrite redux to Replace EntityMap, std::map, std::unordered_map and boost::unordered_map with an upgraded container.
wraitii edited the summary of this revision. (Show Details)
wraitii edited the test plan for this revision. (Show Details)
wraitii added a reviewer: Restricted Owners Package.

Might as well make this revision useful. BOOM. Massive SFINAE for this new container.

I need to assess performance exactly as testing results have proven rather inconclusive. A short AI game (30 minutes) would indicate this is slightly faster than svn, but I'd like longer replays and more profiling. Furthermore, this might still be optimised.

This works so long as you use D1736. I've tested that the hashes are the same, and the tests have become quite extensive so I'm rather confident that it works, the question is "how fast".

Owners added a subscriber: Restricted Owners Package.Sun, Jan 13, 8:03 PM

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

Linter detected issues:
Executing section Source...

source/simulation2/Simulation2.h
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"

source/simulation2/system/ComponentManager.h
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"

source/simulation2/system/ComponentManagerSerialization.cpp
|   1| /*·Copyright·(C)·2017·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2017"

source/tools/atlas/GameInterface/DeltaArray.h
|   1| /*·Copyright·(C)·2009·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2009"

source/simulation2/system/ComponentManager.cpp
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"
Executing section JS...
Executing section cli...

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