模组简介
STS2 Performance Fix Startup and in-game performance for heavily modded runs. Adds no content, no cards, no characters, and changes no gameplay. Every piece can be switched off individually in Mods → STS2 Performance Fix . Startup: 148 seconds → 29 seconds Measured with a CPU profiler on one 36-mod setup, same machine, same mods, back to back: before: 148.3 s to the main menu after: 29.2 s to the main menu Your numbers will differ — the effect scales with how many content mods you run, because the problem is quadratic. On that setup the single worst call tree took 99.2 seconds of the 148, and now takes 1.3. What is actually wrong The game caches its own model lookups properly. CardModel._pool , ModelDb._allCardPools and ReflectionHelper._modTypes are all computed once and kept. But a Harmony postfix runs every single time a getter is called, cache hit or not — and several mods hang a full rescan of every mod type off exactly those getters. With 36 mods that is 18,743 types re-enumerated, re-deduplicated and re-slugified (three regular expressions per type) on every call . Anything that asks 6,341 card models for their Pool triggers it 6,341 times. None of those mods is doing anything unusual. It only becomes expensive because many of them stack on the same few getters, and because one of those getters ( ModelDb.AllAbstractModelSubtypes ) is not cached by the game either — it rebuilds the full type array on every call. What this mod does It caches the final value of those getters — the value after every mod's postfix has had its say — and serves that, skipping both the original and the other postfixes while it does. It also memoizes StringHelper.Slugify , the regex-based string transform that model registration calls thousands of times. It checks itself. The first three times each cache could be used, it runs the real call chain instead and compares. If they ever differ, that cache switches off for the rest of the session and says so in the log. It also drops the cache whenever mods or models change underneath it. Being fast is not worth being wrong. It does not depend on load order. Every patch whose correctness depends on running first or last pins its Harmony priority explicitly, and the list of other mods' postfixes is re-enumerated once they have all loaded. (This matters more than it sounds: at one point the cache was only correct because this mod happened to load late, and nothing would have told you otherwise.) Startup report The game logs one number — time to the main menu — and nothing about who spent it. This mod times each mod individually and shows the breakdown on its own settings page , in your language, with bars you can compare at a glance: Startup took 40.8s Time spent by mods ████████████░░░░ 1.6s RitsuLib ████░░░░░░░░░░░░ 0.5s Heathcliff Wild Hunt ██░░░░░░░░░░░░░░ 0.3s PengoTarot ... Time spent outside mods ████████████████ 8.3s Preparing cards, relics and characters ██████░░░░░░░░░░ 2.9s Loading text and translations Not measured: 15.3s The game's own start-up, plus these 9 mods, which loaded before this one: Skin Changer, AncientWaifus, SavesMerger, ... , BaseLib If your game takes a long time to load, this tells you which mod to look at. Mods that load before this one cannot be timed individually, so they are named and totalled instead. In-game performance (optional, off by default) A 5-minute combat profile showed mod code taking about 70 of 300 seconds on the main thread — roughly half of all C# per-frame work, about 3.9 ms of every 60 fps frame. Most of that is mods doing their job. Three pieces are not: ・a main-menu button visibility check that builds a NodePath from a string every frame, and keeps running during combat ・a main-menu scroller that refreshes every frame even while the menu is hidden behind a fight ・a multiplayer skin sync poll that, in single player, returns at its first line 60+ times a second Throttle per-frame mod work runs those three less often. The skin sync carries its accumulated delta across skipped frames so its timers still advance at real time. None of it is visible to the player. It is off by default because its saving has not been measured yet — only its safety. A second switch covers the HUD followers (reload buttons, power anchors, star counters). Those cost more, but they position UI against things that move, so throttling them can show. Also off by default. Load order The mod moves itself to just after BaseLib in the load order, once, and the change takes effect from the next launch. That gets its caches active for the mods that load after it and lets the startup report itemize them. It moves only its own entry, logs that it did, and can be turned off with Load this mod early if you order your mods by hand. For co-op: the game's two network ID tables (ModelIdSerializationCache and NetTypeCache) both sort by type name, so load order does not affect multiplayer ID assignment. Harmony patch order is still patch order, though, so if you play co-op it is tidiest to have everyone use the same setting. Notes ・ Requires BaseLib. Built for the public branch (v0.107.1). ・ English and Japanese settings screen and report. ・ Marked as not affecting gameplay , so people you play co-op with do not have to install it. It adds no content, and its caches are verified to return the same values the uncached call chain would. ・ This mod changes how other mods behave. That is the point of it, but it means that if something looks wrong, turn the relevant switch off on its settings screen before reporting a bug to the other mod's author. ・ Nothing is referenced at compile time except BaseLib's config screen. Every other mod is reached by string name, so this loads and stays inert when they are not installed. ・ It registers no network actions , so it does not shift multiplayer action IDs the way content mods can. It has not been tested in co-op yet — treat it as untested there.
详情图片
条目信息
- 所属游戏
- 杀戮尖塔 2 (Slay the Spire 2)
- 创意工坊 ID
- 3800152693
- 文件名
- 3800152693.bin
- 文件大小
- 91.1 KB
- 最后更新
- 2026/09/14
- 内容版本
- v1789378217-d053d17cb8d0d004
- 作者与来源
- 由原作者发布于 Steam 创意工坊。本站不改变署名,作者信息与原始内容请以 Steam 原始页面 为准。
