spring: develop 120e14a1 | [ Diff ] [ Back to Repository ] | |||
Author | Committer | Branch | Timestamp | Parent |
---|---|---|---|---|
jK | jK | develop | 2012-02-05 08:46:36 | develop 41d041cb |
Changeset | reduced CPathManager memusage by >50% (~10% of spring's memusage) 1. How did I measured it: `memprof ./spring --safemode` (in non-safemode it crashes cause of LoadingMT) 2. the numbers with ZK & Gunmetal Harbor (20x20 map) Spring total memusage ~450MB + ~200MB by the nvidia drivers CPathManager memusage before: 85MB after: 40MB 3. What did I changed: * don't alloc memory for parentNodePos & nodeOffsets in full resolution buffer (it doesn't use those) * alloc extraCostSynced & extraCostUnsynced only on-demand * get rid of `struct PathNodeState` & move its members into arrays * make it easier to handle the cases above * each (empty!) std::vector<int2> had an overhead of 12bytes in the structure (there might be even a lot more alloc'ed outside of the structure) * by using multiple arrays the CPU caches might be more efficient |
|||
mod - rts/Rendering/DefaultPathDrawer.cpp | [ Diff ] [ File ] | |||
mod - rts/Sim/Path/Default/PathDataTypes.h | [ Diff ] [ File ] | |||
mod - rts/Sim/Path/Default/PathEstimator.cpp | [ Diff ] [ File ] | |||
mod - rts/Sim/Path/Default/PathFinder.cpp | [ Diff ] [ File ] |