Page 1 of 2

How to debug mod performance problem?

Posted: 26 Sep 2017, 06:28
by sirherrbatka
Hello here,

Since openmw is not only playable, but universally superior to original engine i decided that it is about time to make yet anoyther morrowind playtrough (but this time without a single crash!).

I wanted to beat old mod called horror mod (it is scary/cheesy large dungeon) but framerate in the first cell is just horrible (Old Cave). I want to fix this but I don't know what is the proper procedure. Any hints?

Re: How to debug mod performance problem?

Posted: 26 Sep 2017, 08:34
by jirka642
Press F3 few times in game, and see if the "openmw.log" is being spammed by errors (that can also slow openmw down).

Re: How to debug mod performance problem?

Posted: 26 Sep 2017, 14:38
by sirherrbatka
I will check that, thanks!

Re: How to debug mod performance problem?

Posted: 26 Sep 2017, 17:09
by Youth
In my experience, OpenMW's performance is directly dependent on the number of polygons on the screen. Whether this is related to collision or graphics, I am unsure. But the more polygons on the screen, the worse the lag is.

Re: How to debug mod performance problem?

Posted: 26 Sep 2017, 17:56
by sirherrbatka
I don't think that this is the case here. Old Cave is not unusual in number of objects but there can be some wonky scripts running. I will check that.

Re: How to debug mod performance problem?

Posted: 26 Sep 2017, 21:17
by Deltaxus
OpenMW has an error log mechanism, but unfortunately a lack of (toggleable) general logging mechanism. Performance issues usually dont constitute errors though, they just indicate unoptimized routines. Performance optimization was mostly deemed a post 1.0 feature, so nobody is really to blame. Personally, I always keep a "DEBUG" Compile version of any software I write around and certainly when reworking the tes4 script engine. Keep in mind, when your mod uses scripts, this script might also by unoptimized. OpenMW simply executes the bytecodes of the compiled script, it can't possible evaluate the scripts quality, but this doesn't seem to be the problem here, as it runs fine on Vanilla MW.

Re: How to debug mod performance problem?

Posted: 26 Sep 2017, 22:41
by sirherrbatka
Anyway, nothing to do with scripts or rendering. Collision detection is of the charts though! Killing everything that moves helps :lol:

Re: How to debug mod performance problem?

Posted: 27 Sep 2017, 07:52
by jirka642
Must be bad models. You might want to run "tcg" in console to see model collision geometry. (to see which models are problem)
The way some "high quality" models for morrowind are made is very retarded.

Re: How to debug mod performance problem?

Posted: 27 Sep 2017, 11:39
by lysol
sirherrbatka wrote:
26 Sep 2017, 22:41
Anyway, nothing to do with scripts or rendering. Collision detection is of the charts though! Killing everything that moves helps :lol:
Ah this is it then. Can't remember when you became less active here, if you ever ran into this, but one problem we have with performance in the engine right now is bullet's collision detection. And it was even worse before 0.41... The physics thread goes off the charts and this makes the FPS go down, which makes the physics thread go even more off the charts, which lowers the FPS even more which.... you get the point.

This is kind of the one thing that vanilla still handles better than OpenMW.

Re: How to debug mod performance problem?

Posted: 28 Sep 2017, 07:28
by sirherrbatka
It's been years since i actually tried to run openmw so yeah...

In fact collision detection (and hitboxes) seems to be just a little bit off. Hitboxes are especially problematic for creatures of unusual size. For instance it is tricky to actually reach some small monsters from piratelord creatures (and hitting large creatures like imps is sometimes just impossible). I also often had to TCL out of places i had been stuck.

But otherwise it is working really impressive.