Other user's assetsAll the assets in this file belong to the author, or are from free-to-use modder's resources
Upload permissionYou are not allowed to upload this file to other sites under any circumstances
Modification permissionYou must get permission from me before you are allowed to modify my files to improve it
Conversion permissionYou are not allowed to convert this file to work on other games under any circumstances
Asset use permissionYou must get permission from me before you are allowed to use any of the assets in this file
Asset use permission in mods/files that are being soldYou are not allowed to use assets from this file in any mods/files that are being sold, for money, on Steam Workshop or other platforms
Asset use permission in mods/files that earn donation pointsYou must get permission to earn Donation Points for your mods if they use my assets
Author notes
This author has not provided any additional notes regarding file permissions
File credits
This author has not credited anyone else in this file
Donation Points system
This mod is not opted-in to receive Donation Points
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.
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.