TheDrillTeam-BeegOptimizations icon

BeegOptimizations

Less stutter, faster loading for big modpacks. Smooths interior FPS (1% lows ~16 to 60-87 in a 250-mod pack), cuts ~47 s off boot. Covers what other perf mods don't. Client-side.

Last updated 2 hours ago
Total downloads 33
Total rating 0 
Categories Mods Misc Client-side Performance Tweaks & Quality Of Life
Dependency string TheDrillTeam-BeegOptimizations-1.0.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

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

Preferred version: 5.4.2100

README

BeegOptimizations

Less stutter and faster loading for big Lethal Company modpacks.

BeegOptimizations fixes performance problems that only show up when you run a lot of mods together, and that the usual performance mods (LethalPerformance, LethalSponge, CullFactory, DungeonLoadingOptimizer, AsyncLoggers, …) don't already cover. It was built and measured on a ~250-mod pack, and every fix is checked against real benchmark runs.

  • Client-side only. Nobody else in your lobby needs it, and it adds nothing to the network.
  • Safe to keep installed. Each fix only switches on if the mod it helps is installed, and each one has its own on/off setting.
  • Same game, same content. It doesn't remove features, lower graphics or change gameplay. It makes the same work cheaper, or stops it being repeated.

What you'll notice

  • Interiors stop hitching. The regular every-few-seconds stutter inside facilities, mansions and modded interiors is gone. The game feels smooth even when your average FPS was already fine.
  • Your worst moments get much better. In our test pack, the slowest 1% of frames inside interiors went from around 16 FPS to 60–87 FPS.
  • The game starts faster. About 47 seconds less from launch to the main menu in our pack (141 s → 94 s).
  • Lobbies and landings are quicker and smoother. Lobby load is about 5 seconds shorter, and the long freezes while landing are far fewer.

Quick explainer: why "average FPS" isn't the whole story

Your FPS counter shows an average. If the game runs at 110 FPS but freezes for a tenth of a second every few seconds, the average still says 100+ even though it feels choppy. Those short freezes are stutter.

  • 1% low FPS: how fast the game runs during its slowest 1% of moments. If it's close to your average, the game feels smooth. If it's far below, you feel stutter. This mod mainly raises this number.
  • Frame time / "frames over 50 ms": how long single frames take. A frame over 50 ms is a hitch you can see. Fewer is better.
  • GC (garbage collection): the game pausing to clean up memory that mods threw away. In big packs this caused a hitch every ~3 seconds.

Results

Measured with an automated benchmark (same seed, same route, same actions every run) on a ~250-mod pack (the LethalPlus profile), RTX 3070, 12-thread CPU. "Before" has BeegOptimizations removed; everything else is identical.

Inside interiors (60-second walk through each one)

Interior Average FPS 1% low FPS 0.1% low FPS Hitches over 50 ms, per minute Worst single frame
Facility (Experimentation) 109 → 134 16.5 → 75.2 9.5 → 47.4 49 → 0 110 → 48 ms
Mansion (Rend) 103 → 130 17.1 → 86.7 10.0 → 52.4 57 → 0 125 → 45 ms
The Complex (Assurance) 67 → 91 11.7 → 61.1 5.0 → 36.1 122 → 1 354 → 52 ms
Storehouse (Vow) 96 → 122 16.1 → 71.2 11.1 → 37.1 103 → 2 121 → 54 ms

Garbage-collection pauses during each 60-second walk went from 12–20 to 1–2.

Loading

Before After
Launch → main menu usable 140.8 s 93.9 s
Host → lobby usable 23.6 s 18.4 s
Hitches over 50 ms per minute while landing 110–133 19–27

Your numbers will differ with your hardware and mod list. The biggest gains come when the mods listed below are installed.


What it fixes

Each fix applies only when the mod it targets is installed. Click a fix for the technical details.

Scene scan registry: interior stutter from mods that scan the whole scene several times a second (Boneman's LCVR Fixes, High Quota Fixes, others)

Some mods call Unity's FindObjectsOfType on a timer. In a big pack each call walks every loaded object and costs 15–40 ms, so a mod doing it twice a second makes a constant hitch. Measured in an 11-minute session: 2,893 calls, 62.6 seconds of frozen main thread, from:

  • Boneman's LCVR Fixes Watchdog → ReleaseAbandonedLeversAndGearSticks (ShipLever + GearStick, every 0.5 s, always on even without VR)
  • High Quota Fixes PlayerControllerB_Update_Postfix (SandSpiderWebTrap, every second)

BeegOptimizations keeps a live list of those object types instead. It's seeded once from a real scan and kept up to date by hooking the types' Awake. It returns active objects only, sorted by instance ID. Types that get scanned repeatedly are detected and tracked automatically. The first answer after each scene load is cross-checked against a real scan; any mismatch hands that type straight back to Unity, with a warning in the log. It respects LethalPerformance's own FindObjectsOfType patches. Cost after the fix: well under 1 s per session.

Config: [SceneScans].

Fair AI config cache: the biggest cause of the every-3-seconds stutter

Fair AI asks "is setting X on?" through Plugin.Can(...) / Plugin.CanMob(...). Each answer walks every Fair AI config key and upper-cases and character-filters each one. Can runs every frame from StartOfRound.Update and CanMob runs per turret/mine target, so in a big pack (one key per enemy per setting) it threw away ~133 KB of memory every frame (1.5 GB in a 10-minute session). That forced a garbage collection every ~3 seconds.

BeegOptimizations remembers each answer, keyed on its arguments, and forgets them all whenever Fair AI's config changes (setting changed, file reloaded or new entries added). Answers are therefore always the same as Fair AI's own. In the benchmark, 44,168 of 44,169 lookups were served from memory.

Config: [Mods] FairAIConfigCache.

The Complex: faster boot, shorter lobby load, no hitch on the first Poolrooms landing

The Complex generates a lot of its content in code. Three fixes:

  • Pre-compressed texture cache ([Startup] TheComplexTextureCache): The Complex restores ~315 cached textures at boot and re-compresses some of them on the CPU every launch. A copy of the already-compressed data is stored next to its own cache (tied to the source file's size and timestamp) and loaded directly next time. 5.9 s → 1.2 s.
  • Procedural texture cache ([Mods] TheComplexProcTextures): grime decals, carpet stains, pool haze and 60 pool-caustic animation frames are painted pixel by pixel. That was ~3.2 s of the lobby load, plus a ~1.4 s freeze the first time Poolrooms lights turn on after landing. These generators are fixed-seed, so the finished textures (all mip levels) are saved to BepInEx/cache/BeegOptimizations/TheComplex (~22 MB) and restored in ~85 ms. The cache is tied to The Complex's DLL and is rebuilt automatically when The Complex updates.
  • Fast mesh assembly ([Startup] TheComplexFastMeshAppend): while building its ~300 room templates at boot, The Complex copies geometry with MeshBuilder.Append ~13,500 times. That method is rewritten with the same arithmetic written out inline (same float operations in the same order) and writes straight into the lists. On every launch the first 64 calls are compared bit for bit against Unity's own math; any difference switches the fix off. The Complex's load goes from 22.1 s to 18.6 s.
Faster type lookups at startup: Boneman's LCVR Fixes, Ship Medbay and any mod with soft dependencies

Harmony's AccessTools.TypeByName re-lists every type in every loaded assembly on each call. Mods call it to check for optional dependencies, and a big pack has tens of thousands of types, so each call took 1.3–2.8 s. Measured: 19 calls = 18.4 s of boot (LCVR Fixes 16 s, Ship Medbay 2 s).

A BepInEx patcher answers the same question from a per-assembly index, with the same search order and the same result. Boot cost: ~20 ms. LCVR Fixes loads in 3.2 s instead of 15.5 s.

Config: [Startup] TypeLookupIndex.

Skip LCVR's VR start-up when no VR software is running: about 6 s off every launch

LCVR tries to start OpenXR at every launch. Without a headset this fails after ~6 s and LCVR continues in flat mode. If no VR runtime is running (SteamVR, Virtual Desktop, Oculus, Windows Mixed Reality, ALVR, Pico, Vive) and no runtime override is set, BeegOptimizations makes that attempt end immediately with LCVR's own "start-up failed" result. That's the same outcome as before, minus the wait. A note is written to the log.

VR players: start your VR software before launching the game and nothing changes, or set [Startup] SkipIdleOpenXR = false.

No stack traces on ordinary log lines

Unity captures a stack trace for every Debug.Log / LogWarning, which is expensive when a big pack writes thousands of lines. Errors and exceptions keep their stack traces. Config: [Logging] SkipLogStackTraces.


Compatibility

  • Works with any pack size. It was built for, and tested with, packs of 200+ mods.
  • Made to sit alongside LethalPerformance, LethalSponge, CullFactory, DungeonLoadingOptimizer, AsyncLoggers, PathfindingLagFix and friends. It deliberately doesn't do what they already do.
  • Mods it specifically speeds up when present: Fair AI, The Complex, LCVR, Boneman's LCVR Fixes, High Quota Fixes, Ship Medbay. It also helps any mod that uses AccessTools.TypeByName or scans the scene on a timer.
  • If one of those mods changes in a future version so a fix no longer fits, that fix logs "looks different in this version; not patching" and the mod runs exactly as it does without BeegOptimizations.
  • Game version: v81 (Unity 2022.3.62), BepInEx 5.

Config

BepInEx/config/beeg.optimizations.cfg. Every fix has its own true/false switch, all on by default. [Startup] settings take effect at the next launch. [General] VerboseLogging = true logs what each fix does.

FAQ

Will this raise my average FPS? Somewhat (+23–36% inside interiors in our pack), but its main job is removing hitches. The game should feel smoother even where the FPS counter barely moves.

Does it change anything about gameplay, visuals or difficulty? No. Every fix gives the same result as the original code, just faster. The texture caches produce identical textures and the mesh fix is checked bit for bit.

Do my friends need it? No, it's client-side. Each player who installs it gets their own speed-up.

Can I remove it? Yes, at any time. It doesn't touch saves. Its only leftover files are BepInEx/cache/BeegOptimizations and The Complex's *.tex.dxt files, which you can delete.

Something broke? Turn the matching setting off in the config and please report it with your LogOutput.log.