How to debug mod performance problem?

General discussion regarding the OpenMW project.
For technical support, please use the Support subforum.
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

How to debug mod performance problem?

Post 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?
User avatar
jirka642
Posts: 117
Joined: 23 Aug 2014, 11:39
Location: Czech Republic
Contact:

Re: How to debug mod performance problem?

Post 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).
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: How to debug mod performance problem?

Post by sirherrbatka »

I will check that, thanks!
User avatar
Youth
Posts: 9
Joined: 19 Sep 2017, 19:19

Re: How to debug mod performance problem?

Post 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.
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: How to debug mod performance problem?

Post 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.
User avatar
Deltaxus
Posts: 39
Joined: 12 Aug 2017, 17:43

Re: How to debug mod performance problem?

Post 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.
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: How to debug mod performance problem?

Post by sirherrbatka »

Anyway, nothing to do with scripts or rendering. Collision detection is of the charts though! Killing everything that moves helps :lol:
User avatar
jirka642
Posts: 117
Joined: 23 Aug 2014, 11:39
Location: Czech Republic
Contact:

Re: How to debug mod performance problem?

Post 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.
User avatar
lysol
Posts: 1513
Joined: 26 Mar 2013, 01:48
Location: Sweden

Re: How to debug mod performance problem?

Post 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.
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: How to debug mod performance problem?

Post 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.
Post Reply