Skyrim Special Edition
0 of 0

File information

Last updated

Original upload

Created by

meh321

Uploaded by

meh321

Virus scan

Some manually verified files

About this mod

Fix for a bug in Skyrim Special Edition that causes low fps.

Requirements
Permissions and credits
How to install:

1. Install DLL Plugin Loader, make sure to read install instructions of that mod, it must be installed manually.

THEN

2. Use mod manager to install this mod.

OR

2. Put the folder "DLLPlugins" from downloaded archive into your Data directory.


What it does:

Fixes a problem in game code that causes low FPS with many ESP or ESM plugins installed. Also adds option to enable OSAllocators like in vanilla Skyrim, but it's disabled by default because for me it lowered FPS slightly.


Problems?

If you encounter problems such as increased crashing or some new bugs that didn't exist before, please let me know here. I can only test so much alone and I don't even play SSE anyway. You can consider this mod BETA for now and let others test first if you value your save game.


What is this low FPS bug:

There is a bug in game code where if you have more than a few dozen ESP or ESM plugins installed the game FPS will become much lower in some areas. The ESP or ESM file content does not matter at all they can be empty dummy plugins with no masters. This happens because there are at least 4 nested iteration loops the game does in every frame and the lowest loop iterates for each plugin installed, normally this wouldn't be an issue but this code runs on multiple threads and for each plugin it locks a mutex every time, this is very slow. It's not even really a bug, just bad implementation.

But you can test the bug yourself, here's how

1. Make sure your FPS is uncapped completely, this means bLockFrameRate=0 in Skyrim.ini under [Display] and iVSyncPresentInterval=0 in SkyrimPrefs.ini under [Display] as well. Obviously I'm not saying to play like this, it is just used to show for the test just how much FPS you lose for nothing.

2. Get some way to display your FPS in game, could be Fraps, your graphics card software, ENB or something else.

3. Disable all mods except the base game DLC.

4. In main menu put "coc RiftenOrigin", run to the middle of marketplace and look into some specific location you can remember. Check your FPS now. For me it was 145.

5. Download empty ESP plugin, copy and rename it so you have 240 of these, or use some script to do it. Enable these plugins in-game or mod manager or however you do it.

6. Type again from main menu "coc RiftenOrigin" and go to the same place, look at the same point. Check your FPS again. This is with completely empty ESP setup with no extra anything to load.

For me it was 145 FPS without mods and 50 FPS with those empty plugins, that's huge loss for absolutely no reason. Although Riften is the most significant loss of FPS for this test.

Other places I tested:

"coc Riverwood", FPS 115 -> 80
"coc FalkreathExterior01", FPS 102 -> 53


So how is this fixed?

I rewrote the loop that does this basically:

for(int i = 0; i < modCount; i++)
{
    auto form = GetFormById((i << 24) | (formId & 0x00FFFFFF)); // GetFormId contains mutex locking
    // ... some other checks here
}


and changed it to use a custom search method that only loops through forms that actually exist there. Also instead of locking for each form, it locks once for the whole search.


Other stuff

Thanks to people in reddit for pointing out the bug to me.

Thanks to everyone who helps test and reports issues.

No, I won't make this for consoles.

This same bug does Not happen in vanilla Skyrim.

If you find this mod anywhere else it's stolen.


Changelog

v2 (27/06/2017) - Changed the method of how the bug is fixed which should reduce stutters a lot.