LoadTimeProfiler

v1.3.2·Updated 2026-09-09

Startup and join profiling, optional acceleration, timeout protection, and reloadable log filtering

About this mod Author’s original text

LoadTimeProfiler

Profiles modded Valheim startup, world joins, and dedicated server boot. One patcher DLL also provides optional localization caching, config-write coalescing, timeout protection, logging filters, and automatic reload of other mods' BepInEx cfg files.

Features

  • Measures Start to Lobby, Lobby to World, and dedicated server startup.
  • Shows plugin construction, Awake, OnEnable, Start, and major lifecycle timings.
  • Attributes synchronous Harmony callback time in ObjectDB.Awake and ZNetScene.Awake to individual mods.
  • Optionally accelerates supported localization work and automatic BepInEx config writes.
  • Applies a configurable timeout floor to supported vanilla, Jotunn, ServerSync, and AzuAntiCheat paths.
  • Gives each mod four GUID-based log checkboxes, without inspecting the stack on each message.
  • Reloads logging settings automatically, including on headless servers with no connected player.
  • Optionally reloads other mods' registered BepInEx cfg files after local file edits, without an in-game administrator or ConfigManager.
  • Keeps the newest 20 reports for comparison.

Installation

Place LoadTimeProfiler.dll in:

BepInEx/patchers

Do not place it in BepInEx/plugins. Install it separately on each client or dedicated server you want to profile.

Timeout protection is endpoint-local. Install the same build and timeout setting on both client and server when you want equivalent protection in both directions.

Usage

  • Start Valheim normally.
  • Wait for the main menu to measure Start to Lobby.
  • Enter a world to also measure Lobby to World.
  • Open the newest report in:

BepInEx/config/LoadTimeProfiler

Dedicated servers create a Server Startup report in the same directory. Compare multiple warm runs because disk cache, network conditions, world size, and background programs can affect loading time.

Start To Lobby starts at this patcher's Patch callback and ends when FejdStartup.Start completes. It does not include the entire executable startup or all later rendering. The earlier preloader config/Manual logging setup is outside that clock; use an external launch-to-menu measurement when comparing total startup cost.

In Valheim 1.0, the intro cinematic can continue after this boundary. Intro playback, skipping it, and the time until the menu accepts input are outside this measurement; the existing timing boundary stays unchanged.

Lobby To World starts when TransitionToMainScene accepts the world transition and ends when SpawnPlayer completes. Earlier login, password, permission, warning, and world-selection prompts are not included.

Configuration

The configuration file is:

BepInEx/config/sighsorry.LoadTimeProfiler.cfg

| Setting | Default | Purpose |

|---|---:|---|

| General.ProfilingEnabled | true | Measures loading times, creates timing reports and enables lifecycle and per-mod attribution. |

| General.LocalizationCacheEnabled | true | Caches supported vanilla and external localization work. |

| General.ConfigWriteCoalescingEnabled | true | Coalesces automatic config writes during Chainloader.Start. |

| General.ConfigAutoReloadEnabled | false | Automatically reloads other mods' registered BepInEx cfg files after local file edits. Restart required. |

| General.TimeoutProtectionSeconds | 120 | Sets the minimum supported connection and send-queue timeout. Use 0 to disable it. |

| Logging.Mods. | Errors, Warnings when absent | Allowed groups for the mod's default BepInEx logger. |

Each mod has four independent checkboxes. There is no logging master switch, common logger option, or source-name override.

| Checkbox | Config name | Default |

|---|---|---|

| Fatal + Error | Errors | Checked |

| Warning | Warnings | Checked |

| Message + Info | Information | Unchecked |

| Debug | Debug | Unchecked |

Unconfigured mods keep fatal/error/warning messages and suppress message/info/debug on their default logger. Clear every checkbox (None in the file) to silence that logger; select all four to allow every event,

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.

Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file. In multiplayer, the host and every client need the same mods installed.

Dependencies

Install these first, or the mod will not work:

denikson-BepInExPack_Valheim

File & checksum

Filename
LoadTimeProfiler-1.3.2.zip
File size
200.2 KiB