Skip to content

Port Benchmark & Optimizer profiling to Timberborn 1.1 - #50

Closed
tharbad08 wants to merge 1 commit into
datvm:masterfrom
tharbad08:pr/benchmark-optimizer-v11-upstream
Closed

tharbad08 wants to merge 1 commit into
datvm:masterfrom
tharbad08:pr/benchmark-optimizer-v11-upstream

Conversation

@tharbad08

Copy link
Copy Markdown

Port Benchmark & Optimizer to Timberborn 1.1 (CSV profiling and protected intervals)

Summary

Port the existing Benchmark & Optimizer to Timberborn 1.1, keeping the original BenchmarkAndOptimizer/ implementation unchanged.

This supersedes closed PR #46 with a clean, single-commit contribution based on the latest upstream master.

Features

  • On-demand 120-second CSV benchmarking, including per-system CPU timings and originating mod information.
  • Frame-time, FPS, managed memory and garbage-collection measurements.
  • Optional read-only TimberPhysics timing.
  • Configurable per-system update intervals, defaulting to vanilla cadence.
  • Hard protections against throttling simulation-critical systems.
  • Improved settings UI with filtering and system-origin information.
  • Pause-menu shortcut for accessing the benchmark settings.
  • System discovery during startup and benchmarking.

Compatibility

The port is independent of TB Optimizer, which retains the stable gameplay performance fixes.

TBOptimizer is declared as an optional dependency so both mods can coexist with the intended load order.

Benchmark & Optimizer disables only its own configured throttling while profiling. TB Optimizer's stable fixes remain active.

The implementation does not incorporate unrelated EBR, BFR, Keystone, SWC, SuperCursor, terrain or garbage-collection optimizations.

Validation

  • Diff limited to 38 files and one commit.
  • Reviewed against upstream Agents.MD and the original mod's conventions.
  • GitHub Actions compilation successful.
  • Installable v1.1.104 tested in Timberborn 1.1 and confirmed working by the tester.
  • Pause-menu compatibility issue corrected.
  • Complete benchmark CSV output validation.
  • Interval persistence and restoration regression testing.
  • Full optional-dependency compatibility matrix.

Notes

The default interval of 1 preserves vanilla update frequency. Increasing intervals can alter simulation behavior and should be tested cautiously.

System discovery is not guaranteed to identify every installed or dynamically loaded system.

Original Benchmark & Optimizer source remains unchanged.

Contributor: tharbad08

Build: [Successful GitHub Actions run](https://github.com/tharbad08/TimberbornMods/actions/runs/38868790897)

Restore on-demand 120-second CSV and frame/GC profiling, protected per-system update intervals, optional TimberPhysics timing, and the pause-menu settings shortcut. Port 1.1.104 is validated in game by tester and remains independent of stable TB Optimizer. Build and packaging workflow included; original U7 mod remains untouched.
@datvm

datvm commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Can't be compiled.

@datvm datvm closed this Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants