Profiling Morrowind Scripts

Post » Mon Jun 21, 2010 12:11 pm

Hi!

I've spent an entire week meticulously adding mods to my game, one by one, testing them out, and observing their effect on the engine and my performance. I'll describe my method and results below, but first I'll get to the nut of my question. Is there any way to "profile" Morrowind's scripts? That is, to get a breakdown of which scripts are running and how long they're taking to complete every frame. I'm seeing a huge discrepancy between the fps I had during my testing and the fps I now have after creating a new game. I'm trying to understand which mod/script is the culprit.

Even if there's no way to get a profile, is there at least a way to list which scripts are running and turn them off one by one?

Thanks for your help. Below is a description of how I got to where I am with this.

------

This was my method for adding/testing mods and the results:

- With a fresh game install, I traveled to various cities/locations and made save games
- One by one I added mods to my game and then loaded some of my save games, especially at more intense locations or the ones nearest to affected areas
- After loading the area I would walk around a bit, observe the fps, find the related stuff that the mod added, etc

By the time I finished my testing I was pleased with the results - the game ran at 25fps or higher in almost every city and more than 30fps everywhere else. I was finally ready to make my real character and start adventuring. I made a backup of my Morrowind folder in case I needed to revert and I was ready to go.

So I created my new character and after leaving the Census & Excise Office, boy was I surprised. My fps had gone from a smooth 30fps in Seyda Neen to a noticeably choppy 18-22fps. If I load one of my test saves (without quitting the game first) it will also run at about 18-22fps.

I had found the flaw in my method - something I've added causes a permanent fps hit during/after character creation, and for some reason it continues to apply even after loading an old saved game.
User avatar
Bellismydesi
 
Posts: 3360
Joined: Sun Jun 18, 2006 7:25 am

Post » Tue Jun 22, 2010 12:40 am

I don't think there's any way to profile scripts.
I think you can try using some of the toggle commands (togglescripts, togglecollision, tcb, ...) to see if you get an immediate boost when you turn off parts of the engine. It might help confirm your hypothesis as to where all the effort is being spent.
User avatar
Alexander Lee
 
Posts: 3481
Joined: Sun Nov 04, 2007 9:30 pm

Post » Mon Jun 21, 2010 7:56 pm

You could try this:
use the console command togglescripts: this way you can decide if it is a script problem or something else.
Try to find your last saved rest game with no problem, save to a file its master list using Mash/Copy list option, and compare that mod list with the same list coming from your problematic saved game; the culprit(s) should be inside the mods present in the second list and absent in the first list.
[EDIT]Here is a http://winmerge.org/ to compare the lists.
User avatar
Krystina Proietti
 
Posts: 3388
Joined: Sat Dec 23, 2006 9:02 pm


Return to III - Morrowind