[0.12.3 Optimisation] - Dungeon Map strange performance described [RESOLVED 0.13.2]

Moderators will move topics here from Help & Support once an issue has been confirmed and enough information provided to reproduce.
Post Reply
User avatar
King of Worms
Posts: 4294
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

[0.12.3 Optimisation] - Dungeon Map strange performance described [RESOLVED 0.13.2]

Post by King of Worms »

So the map has some performance issues and that is known. Just recently Ive found out, one press of a button can massacre the performance, and thats strange enough for me to report it. It might help optimizing the map in a future.

I open the map. I have 60 fps locked, if I disabled VSYNC than possibly much more fps.

Than I press and hold right mouse button and my fps goes to 35.

I dont even move the map, I just press and hold that button.
The CPU usage is the same, the GPU usage is the same, just the FPS tanks.
01.jpg
01.jpg (205.33 KiB) Viewed 413 times

User avatar
Interkarma
Posts: 6578
Joined: Sun Mar 22, 2015 1:51 am

Re: [0.12.3] - Dungeon Map strange performance described

Post by Interkarma »

This is a good spot. :)

Short version: The map display is rendered multiple times when right mouse is held down.

Long version: When rightMouseDownOnPanelAutomap=true then ActionRotate() and ActionrotateCameraOnCameraYZplaneAroundObject() are called for 3D map. Both of these methods call UpdateAutomapView() to redraw automap. Then UpdateAutomapView() is called yet again afterwards. So just holding down right mouse button causes automap to be rendered at least 3x times even if you don't move the mouse.

This can obviously be cleaned up to only render once when map is actually rotated. I'll move this to Issues as a refinement for later.

Edit: It was a fairly simple fix, so I've just merged that now. Change will be in 0.13.2 and later.

https://github.com/Interkarma/daggerfal ... 29c74d80a4

User avatar
King of Worms
Posts: 4294
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: [0.12.3] - Dungeon Map strange performance described

Post by King of Worms »

Nice ๐Ÿ˜Š using these MSI metrics pays off ๐Ÿ‘

Post Reply