KSPPerformanceProfiler

Low-overhead in-game performance profiler, micro-stutter hunter & native Mono heap padder for KSP 1.12.x. Pinpoint heavy Mod callbacks in any scene.

License: MIT

Game Version: 1.12.5

Downloads: 18

Author: diaodiaosama

Followers: 1

Mod Dependence:Harmony / https://github.com/KSPModdingLibs/HarmonyKSP

KSPPerformanceProfiler

Hotkeys

Hotkey Action
Ctrl + Shift + P / Alt + Shift + P / Numpad + Toggle the full profiler panel
Ctrl + Shift + H / Alt + Shift + H Open / toggle Mini HUD mode
Alt + End / Mod + End Apply the recommended Mono heap padding

You can also open the panel from the green performance icon on the game's AppLauncher in any scene.

Requirements

  • Kerbal Space Program 1.12.x (1.12.0 – 1.12.5)
  • Harmony 2.x (000_Harmony) — usually bundled with ModuleManager, Community Category Kit, or KSPCommunityFixes

Installation

  1. Download the ZIP and extract it into your KSP root folder so that the mod lands in GameData/KSPPerformanceProfiler/.
  2. Launch the game and click the toolbar icon or press a hotkey in any scene.

A next-generation, low-overhead in-game performance profiler, micro-stutter hunter, and native Mono heap anti-stutter manager for Kerbal Space Program 1.12.x.

Works in every scene — Flight, Map, KSC, VAB/SPH, and the Tracking Station — and drills through KSP's native dispatcher to reveal the real Mod callbacks behind frame spikes. No more blind stutter hunting.

Features

1. Mono Heap Anti-Stutter Management

With many Mods installed, Mono garbage collection (GC Stop-The-World) is the leading source of micro-stutters. This Mod natively integrates resident heap protection:

  • Permanent static GC root — the padded physical memory block lives in a static root reference. Even when GC runs, the block is never released or shrunk, pushing GC stalls from every few seconds to once every tens of minutes.
  • Non-intrusive by design — does not pad automatically on first install; it only suggests a recommended value after a scene loads, and you apply it manually in settings or via a hotkey.
  • Smart memory detection — detects your physical RAM (8 / 16 / 32 / 64 GB+) and recommends a safe padding size, always reserving at least 4 GB for the system and GPU.
  • Fine-grained tuning — accepts any integer (MB), with [-1024M] [-512M] [+512M] [+1024M] step buttons and a one-click release to return memory to the system.

2. Frame-Spike Capture & Auto-Freeze

  • Microsecond spike radar — automatically captures a frame's full diagnostic topology when its time exceeds 200% of baseline and 35 ms (or FPS falls below 15).
  • Top-6 culprit ranking — lists the 6 heaviest entities in that frame, pinpointing class name, Mod assembly, lifecycle method, and whether GC caused it.
  • Auto-freeze review — optionally pauses the physics engine and game clock at the moment of a severe stutter to preserve the scene; one click resumes.

3. Interactive Timeline Graph

  • Dual-mode chart — a stacked area chart shows the cost breakdown across PartModules, plugin scripts, PhysX physics, GPU rendering, and engine scheduling; the FPS curve marks 60 / 30 / 20 FPS baselines plus the 1% Low smoothness metric.
  • Hover inspection — hover any bar to see that frame's microsecond composition and per-module share.
  • Single-frame lock — click an anomaly frame to highlight and review it in the analysis card below.
  • Layer toggles — show or hide the module, plugin, physics, and GPU layers independently.
  • GC markers — an orange ◆ above the timeline marks frames where GC occurred.

4. Smart Bottleneck Diagnostics

Automatically identifies your performance shortfall and suggests a fix:

Diagnosis Symptoms Recommendation
🛑 Physics / Joints bound Physics real-time ratio drops, top clock turns yellow/red Reduce part count, reduce AutoStrut rigidity, or install KSPCommunityFixes
🛑 Mod plugin overhead Global singleton manager scripts use high CPU Sort the plugin list by cost to locate heavy Mods
🛑 PartModule bound PartModule cost spikes on the vessel Check heavy parts in Waterfall, FAR, B9, etc.
🛑 GPU / render bound GPU saturated, frame time concentrated in the render pipeline Lower resolution, anti-aliasing, or ground scatter density
🛑 Post-processing overhead TUFX multi-pass adds high CPU/GPU cost Reduce active TUFX passes or disable DoF/AA
🛑 Micro-stutters / GC 1% Low FPS drops sharply, heavy jitter Use the built-in heap padder to reduce GC frequency
🟢 Balanced & smooth Physics clock at full speed, stable FPS Excellent performance — enjoy the flight

5. Five-Level Drill-Down & Dispatcher Penetration

📦 Assembly (DLL)
 └── 📂 Subsystem (timing / vessel dynamics / celestial orbits / EVA / editor)
      └── 📄 Concrete type (class / component)
           └── ⚙️ Lifecycle method (FixedUpdate / Update / LateUpdate / OnRenderImage)
                └── ⚡ Dispatcher penetration (TimingPre, Timing1~5 → Principia, Scatterer…)

Dispatcher penetration is the core differentiator of this Mod. Traditional tools see only native black-box cost when inspecting TimingPre or TimingManager; this Mod drills directly into the underlying delegate call chain to surface the real Mod callbacks hidden behind the native dispatcher (e.g. PrincipiaPluginAdapter.Precalc).

6. Free Resize & Responsive Layout

  • Free resize — drag the ◢ handle to resize; adapts to 1080p / 2K / 4K.
  • Works everywhere — Flight, Map, KSC, VAB/SPH, and the Tracking Station.
  • Position memory — window size and position are saved with screen-edge snapping, so the window can't be lost off-screen.
  • One-click export — exports a full diagnostic report to GameData/KSPPerformanceProfiler/Logs/.

FAQ

Q: How much performance overhead does the Mod itself add? A: Virtually none. Core interception and rendering paths use a strict zero-allocation strategy, and UI refresh is merged with a 250 ms damper — the Mod's own cost is typically below 0.05 ms per frame.

Q: Why isn't heap padding applied automatically after installation? A: Modifying memory should be an informed, deliberate choice. On first install it only shows a one-time recommendation and never takes your physical RAM on its own; apply it manually in settings anytime.

Q: I already have MemGraph or HeapPadder — will it conflict? A: This Mod's heap padder fully replaces their core functionality. Remove the old versions to avoid multiple Mods requesting extra padded memory.

Q: I can't see the Mod icon in-game. What should I do? A: The Mod registers for all scenes. If the toolbar icon is pushed off-screen by too many plugins, press Ctrl + Shift + P or the numpad +.

License

MIT — free to study, distribute, and modify. PRs and issues are welcome.

Loading changelog...

Stats for KSPPerformanceProfiler

Downloads over time

Downloads per version

New followers per day

Top Referrers

  1. spacedock.info
  2. sd1b.52k.de
  3. bing.com
  4. sd-prod-live.52k.de
  5. yandex.ru
  6. www.google.com
  7. duckduckgo.com
  8. github.com

Export Raw Stats

Export Downloads

Export Followers

Export Referrals

Raw stats are from the beginning of time until now. Each follower and download entry represents one hour of data. Uneventful hours are omitted.