MSchmoecker-LocalizationCache icon

LocalizationCache

A small mod that caches localization loading, which can help improve startup performance and reduce possible connection timeouts

Last updated 8 months ago
Total downloads 15142
Total rating 6 
Categories Mods Misc Server-side Client-side Mistlands Update Hildir's Request Update
Dependency string MSchmoecker-LocalizationCache-0.2.0
Dependants 121 other packages depend on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2105 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.

Preferred version: 5.4.2105

README

LocalizationCache

About

This is small mod that caches localization loading, which can help improve startup performance and reduce possible connection timeouts.

With no other mods and the language set to English, only a small improvement is achieved. On my system, the load time is reduced by a few hundred milliseconds. If you have mods that call the localization multiple times, you can expect an improvement of a few seconds. Some mods also cache internally, so the improvement may not stack beyond a certain point.

In some cases, loading is also triggered when joining a world which can exceed the 30s Steam timeout and cause a disconnect. This mod can help to reduce those disconnects, especially on low end systems.

The log messages Loaded localization file #0 - 'localization' language: 'English'... will still be printed, as some mods rely on the underlying functionality. While the vanilla localization is cached in this case, mods may load their own localization files for the first time which are not cached.

Configuration

General:

  • Enable Cache: Enable caching of localization files. Disable to compare loading times. Requires a restart to take effect. Default: true

Debugging:

  • Log Timing: Log timing information for Localization.SetupLanguage. Requires a restart to take effect. Default: false
  • Log Stacktrace: Log stacktrace for each Localization.SetupLanguage call. Requires a restart to take effect. Default: false

Manual Installation

This mod requires BepInEx. Extract all files to BepInEx/plugins/LocalizationCache.

The mod can be installed on both server and client and is optional. However, it will have the most impact on the client.

Links

Changelog

0.2.0

  • Fixed caching did not distinguish between different localization files, resulting in missing vanilla translations
  • Added config options for debugging timing and stacktrace

0.1.0

  • Release