View Issue Details

IDProjectCategoryView StatusLast Update
0000012Medieval EngineersBugpublic2020-10-25 19:13
Reportergwindalmir Assigned Toequinox  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version0.7.2 
Target Version0.7.3.33D4BBFixed in Version0.7.3.33D4BB 
Summary0000012: CPU usage spikes with dynamic grids on voxels
Description

Described by Sir_Moodz on discord: https://discordapp.com/channels/125011928711036928/313704145695670273/700852071305314378

also started looking into fixing the game by editing the code. The next important thing I want to fix is the performance leak with dynamic grids in contact with voxels. It hurts servers really bad, requiring restarts regularly
maybe Deepflame knows where this could be :joy: Since he might have written the code that is causing it
I first discovered this while building a tank with real tracks. If it was driving over voxels and all the grids it was made of where active you could see the cpu use go up very quickly and within a minute simspeed would start dropping. When driving away from voxels on a grid for example this would not happen. And it likely happens with all dynamic grids near voxels but at a much slower rate. (based on how complex the grid is)
it must be something that is created which uses cpu constantly but not cleaned up.

TagsGrid, Voxel

Relationships

parent of 0000053 resolvedequinox MyMotionEventsComponent fires events every frame  
parent of 0000051 resolvedequinox Poor grid-voxel collision performance for large multi-shape blocks  
parent of 0000052 resolvedequinox Block colliders are added to the sparse grid multiple times  
parent of 0000061 resolvedequinox Enable voxel decimation for physics  

Activities

peaceman

2020-09-24 11:08

reporter   #~0000011

Update on this: there are 2 problems with a similar result.

  • performance leak in sound engine. For every sound effect that is used this increases. When a dynamic grid is active near voxels this performance loss buildup is noticed
  • exponential cpu consumption the bigger a bounding box is, when nearby voxels. only for active grids. Also for non placed grids

peaceman

2020-09-24 11:10

reporter   #~0000012

The first one is not noticed on servers (does not use sound engine)
the second one is and very problematic. very high priority to fix

peaceman

2020-10-02 12:31

reporter   #~0000024

When trying to place a block the lag is only when the block is near another small grid (dynamic or static). There is no lag when near voxels or large grids

equinox

2020-10-13 05:38

administrator   #~0000026

Last edited: 2020-10-13 05:39

The second one might be a symptom of 0000051. Can you check if it still happens with that fix applied?

Issue History

Date Modified Username Field Change
2020-04-18 00:14 gwindalmir New Issue
2020-04-18 00:14 gwindalmir Tag Attached: Voxel
2020-04-18 00:15 gwindalmir Tag Attached: Grid
2020-09-24 11:08 peaceman Note Added: 0000011
2020-09-24 11:10 peaceman Note Added: 0000012
2020-10-02 12:31 peaceman Note Added: 0000024
2020-10-13 05:38 equinox Note Added: 0000026
2020-10-13 05:39 equinox Note Edited: 0000026
2020-10-14 03:44 equinox Relationship added parent of 0000053
2020-10-18 02:50 equinox Assigned To => equinox
2020-10-18 02:50 equinox Status new => assigned
2020-10-18 02:50 equinox Target Version => 0.7.3.33D4BB
2020-10-18 02:50 equinox Status assigned => in progress
2020-10-18 03:04 equinox Relationship added parent of 0000051
2020-10-18 03:04 equinox Relationship added parent of 0000052
2020-10-18 03:07 equinox Relationship added parent of 0000061
2020-10-25 19:13 equinox Status in progress => resolved
2020-10-25 19:13 equinox Resolution open => fixed
2020-10-25 19:13 equinox Fixed in Version => 0.7.3.33D4BB