Opened 11 years ago
Last modified 11 years ago
#1995 closed enhancement
[Performance] Memory allocation reduction — at Version 3
Reported by: | Jorma Rebane | Owned by: | Jorma Rebane |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 15 |
Component: | Core engine | Keywords: | patch performance memory |
Cc: | Patch: |
Description (last modified by )
Using MTuner data from a short run of the game, we can drastically improve 0 A.D. core engine performance, by reducing the number of allocations in the detected hotspots.
For more information, check the Memory Performance thread on the forums: http://www.wildfiregames.com/forum/index.php?showtopic=17310&st=20#entry270448
<progress>, <memblock>, <total memops>, <stacktrace> (V), size 4, count 61320, modeldef.cpp:300 (V), size 8, count 61320, modeldef.cpp:301 ( ), size 48, count 42028, parser.cpp:246 ( ), size 36, count 40866, guimanager.cpp:273 & 265 (V), size 8, count 32749, modeldef.cpp:241 ( ), size 32, count 27638, textrenderer.cpp:136 ( ), size 8, count 21952, cgui.cpp:986 ( ), size 16, count 21952, textrenderer.cpp:77 ( ), size 16, count 21952, shaderdefines.cpp:135 ( ), size 48, count 21952, cgui.cpp:954 ( ), size 12, count 20688, modelrenderer.cpp:635 ( ), size 112, count 17325, guirenderer.cpp:388!) ( ), size 108, count 16896, patchrdata.cpp:173 ( ), size 8, count 14852, shaderdefines.cpp:116 ( ), size 48, count 14154, font.cpp:33 ( ), size 36, count 13230, patchrdata.cpp:1025 ( ), size 48, count 12008, parser.cpp:981 ( ), size 24, count 9783, patchrdata.cpp:1025 ( ), size 8, count 9645, modelrenderer.cpp:433 ( ), size 8, count 8935, modelrenderer.cpp:698 ( ), size 48, count 8265, cgui.cpp:916 ( ), size 48, count 8144, parser.cpp:933 ( ), size 93, count 7806, guitext.cpp:266 ( ), size 132, count 7806, cgui.cpp:689 ( ), size 132, count 7806, cgui.cpp:800 & 855 ( ), size 12, count 7072, modelrenderer.cpp:636 ( ), , , textrenderer.cpp:77 ( ), , , textrenderer.cpp:179 ( ), , , patchrdata.cpp:1052 ( ), , , guitext.cpp:210 ( ), , , terraintextureentry.h:75 ( ), , , patchrdata.cpp:192 ( ), , , cgui.cpp:675 ( ), , , texturemanager.cpp:150 ( ), , , texturemanager.cpp:153 ( ), , , texturemanager.cpp:511 ( ), , , texturemanager.h:136 ( ), , , parser.cpp:639 ( ), , , componentmanager.cpp:620
Change History (3)
comment:1 by , 11 years ago
Description: | modified (diff) |
---|
comment:2 by , 11 years ago
Description: | modified (diff) |
---|
comment:3 by , 11 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.
CModelDef fixes uploaded. This patch addresses two problems: 1) CModelDef loading performance
2) Complex dynamic objects in structs
The result: much better memory performance and usage for model loading.
In order for this to work, I had to change the version of the PMD (binary model cache) format to 4 and change the way models are saved to PMD. This may invalidate any existing model cache. Backwards compatibility for versions 1, 2, 3 is there.