You are viewing a potentially older version of this package. View all versions.
Bub-MicroOptimizer-1.0.4 icon

MicroOptimizer

Micro-optimizations for smoother gameplay. Reduces lag spikes through component caching, string optimization, and HashSet lookups.

By Bub
Date uploaded 2 weeks ago
Version 1.0.4
Download link Bub-MicroOptimizer-1.0.4.zip
Downloads 459
Dependency string Bub-MicroOptimizer-1.0.4

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2304 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2304

README

Micro Optimizer

Micro Optimizer focuses on micro-optimizations not covered by other performance mods. It targets specific bottlenecks that cause stuttering during gameplay.

Features

  • String Allocation Optimization - Uses StringBuilder for scrap value formatting to reduce GC pressure
  • Component Lookup Caching - Caches NetworkObject lookups during enemy and scrap spawning
  • Ship Item Collection - Uses HashSet instead of List.Contains() for O(1) lookups when collecting scrap

Configuration

A config file is generated at:

<game directory>\BepInEx\config\mrbub.microoptimizer.cfg

Available settings:

  • OptimizeStringAllocations
    Use StringBuilder for string formatting to reduce allocations.
    Default: true

  • CacheRepeatedLookups
    Cache NetworkObject lookups during spawning.
    Default: true

  • OptimizeShipItemCollection
    Use HashSet instead of List.Contains() for O(1) scrap collection lookups.
    Default: true

  • EnableDebugLogging
    Enable detailed logging for debugging (creates more log spam).
    Default: false

Installation

Drop the MicroOptimizer.dll into your game's BepInEx plugins folder:

<game directory>\BepInEx\plugins

Credits

Made with love by mrbub.

CHANGELOG

Changelog

[1.0.4 - 2025-01-26

Fixed

  • Removed collision component caching that was causing swimming/quicksand bugs

Changed

  • Focused on three core optimizations: string allocation, component lookup caching, and ship item collection
  • Added debug logging option for troubleshooting

[1.0.3] - 2025-01-24

Fixed

  • Fixed swimming animation stuck on land after exiting water
  • Fixed underwater state not clearing properly

[1.0.2] - 2025-01-23

Changed

  • Renamed mod from LethalOptimizer to Micro Optimizer
  • Updated GUID to mrbub.microoptimizer

[1.0.1] - 2025-01-23

Fixed

  • Removed time-based cache clearing that was defeating the purpose of caching
  • Caches now only clear on actual game state changes (level load, round end, ship reset)
  • Removed unused clock string caching code

Performance Improvements

  • PlayerControllerB cache now persists properly during gameplay
  • NetworkObject cache maintains entries across spawning operations
  • Significantly more cache hits, better performance gains

[1.0.0] - 2025-01-23

Release