All Projects → Karandra → PrivateProfileRedirector

Karandra / PrivateProfileRedirector

Licence: GPL-3.0 License
Speeds up game start by storing INI files in memory instead of opening, parsing and closing the file each time some value from it is needed.

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to PrivateProfileRedirector

JContainers
JSON-based data structures for Papyrus - the TESV Skyrim SE scripting language
Stars: ✭ 70 (+233.33%)
Mutual labels:  skyrim-special-edition, skse
SkyrimSETest
Reverse engineering TES: Skyrim Special Edition.
Stars: ✭ 86 (+309.52%)
Mutual labels:  skyrim, skyrim-special-edition
libloot
A C++ library for accessing LOOT's metadata and sorting functionality.
Stars: ✭ 22 (+4.76%)
Mutual labels:  skyrim, skyrim-special-edition
bsa
C++ library for working with the Bethesda archive file format
Stars: ✭ 17 (-19.05%)
Mutual labels:  skyrim, skyrim-special-edition
papyrus-lang
📜Advanced language tools for the Papyrus scripting language.
Stars: ✭ 65 (+209.52%)
Mutual labels:  skyrim, skyrim-special-edition
SublimePapyrus
A Sublime Text 2 and 3 package for the Papyrus scripting language.
Stars: ✭ 44 (+109.52%)
Mutual labels:  skyrim, skyrim-special-edition
pyro
Parallelized, Incremental Build Automation for TESV, SSE, and FO4 Projects
Stars: ✭ 45 (+114.29%)
Mutual labels:  skyrim, skyrim-special-edition
BSA Browser
Bethesda Archive Browser & Extractor
Stars: ✭ 62 (+195.24%)
Mutual labels:  skyrim, skyrim-special-edition
skyrim
The Skyrim masterlist.
Stars: ✭ 68 (+223.81%)
Mutual labels:  skyrim
skyrimse
The TES V: Skyrim Special Edition masterlist.
Stars: ✭ 99 (+371.43%)
Mutual labels:  skyrim-special-edition
Keizaal
Keizaal is a simple modlist that seeks to enhance and expand on Skyrim without compromising Bethesda’s original vision that we all fell in love with back in 2011.
Stars: ✭ 14 (-33.33%)
Mutual labels:  skyrim
libloadorder
A cross-platform library for manipulating the load order and active status of plugins for the Elder Scrolls and Fallout games.
Stars: ✭ 23 (+9.52%)
Mutual labels:  skyrim
QUI-SKSE
Various UI tools, tweaks, and fixes
Stars: ✭ 91 (+333.33%)
Mutual labels:  skse64

PrivateProfileRedirector

Speeds up game start by storing INI files in memory instead of opening, parsing and closing the file each time some value from it is needed.

Problem

The problem this plugin tries to solve comes from the fact that the game uses an old, deprecated and extremely inefficient function to load values from INI files. The function in question is GetPrivateProfileString, a relic of 16 bit operating systems. But do you know what is worse than using such a function? Using it hundreds of thousands of times.Apparently the game uses that function for every game setting individually, which means that the same ini file is opened and closed hundreds of times. What really makes this terrible is the fact that for each enabled plugin the game will attempt to read all the same settings from a hypothetical INI file that that plugin might or might not be loading. So you end up with an insane amount of incredibly inefficient calls for each enabled mod plugin. As a solution this mod will hook the functions involved and load the target INI files in memory so that each following call to the same INI file will be much faster as it will read directly from memory and will not require opening the file from scratch again.

The amount of seconds that this mod will reduce your start time by depends on the amount of enabled plugins you have, as well as other things using INI files such as ENB (though ENB comes with it's own loading issues that this mod can't fix). It will be basically imperceptible when used on the vanilla game and will go up from there, shaving off 6 seconds for 50 or so plugins, up to 20+ seconds for 250+ plugins.

Solution

When the game, ENB or something else calls GetPrivateProfileString first time this plugin will load requested file in memory and return required data. Next time, no file will be loaded and data will be fetched from memory as well. Same thing happens when process tries to write a value to file. Instead of opening file again, parse and save to disk the plugin will write data it to in-memory file and then saves to disk (if allowed). Also all files is saved on game close, if game won't crash in process.

Requirements

Download page

Covered functions

  • GetPrivateProfileStringA
  • GetPrivateProfileStringW
  • WritePrivateProfileStringA
  • WritePrivateProfileStringW
  • GetPrivateProfileIntA
  • GetPrivateProfileIntW
  • GetPrivateProfileSectionNamesA
  • GetPrivateProfileSectionNamesW
  • GetPrivateProfileSectionA
  • GetPrivateProfileSectionW

Configuration

Plugin can be configures in its own INI file, each parameter is described inside this file.

Q&A

Q: Do I really need this?
A: It depends. If your game starts from shortcut to main menu in split second then no. If it takes longer, this plugin can help. How much time you will save depends on your setup.

Q: Will this work with MO/NMM/Vortex/Kortex (yeah, I had to mention it) or any other mod manager?
A: It was tested with MO2 and Kortex and no problems was found. Vortex and NMM have not been tested yet but are expected to work just fine. I can't say anything about compatibility with other mod managers.

MO1 is Not compatible, Mo1 uses those same functions this plugin hooks to inject the BSA list into the INI settings and a bunch of other stuff. This plugin interferes with that making Mo1 not work correctly. MO1 already has some optimizations in place for this problem so this mod is not really needed that much for MO1 users.

Q: I installed it and game crashes at startup.
A: Enable log in config file and reproduce your crash. Go to Data\SKSE\Plugins, look for file PrivateProfileRedirector.log, zip it, upload it somewhere and post a link to it in your issue report. Log file can be more that 100 MB, so don't upload it as is, be sure to compress it.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].