
Optimize the Spire
Optimize Your Slay the Spire Experience
Are you looking to streamline your Slay the Spire gameplay, especially when delving into the rich world of mods? Optimize the Spire is designed with performance in mind, aiming to make your runs smoother and more responsive. While its effects are most pronounced in heavily modded setups, even vanilla Slay the Spire can benefit from these optimizations.
Core Performance Enhancements
This mod focuses on reducing unnecessary processing and improving the efficiency of game operations. It’s important to note that Optimize the Spire does not target RAM usage directly; for those specific issues, other mods might be more suitable. Instead, it tackles performance bottlenecks in several key areas of the game’s code.
Technical Improvements Under the Hood
Optimize the Spire implements a series of technical changes designed to boost performance:
- Relic Lookup Optimization: Methods like `hasRelic` and `getRelic` have been significantly optimized. By utilizing a hashmap to track relic locations, these operations are transformed from a potentially slow list iteration to a near-instantaneous lookup. This can drastically reduce processing, especially during game startup with many mods installed.
- Non-Essential Logger Filtering: The mod intercepts and skips the output of standard, non-critical loggers. This reduces the overhead associated with console printing, which can lead to smoother loading times and even improved combat performance, particularly on less powerful hardware. Critical crash information is still preserved, and this feature can be managed via the mod configuration menu.
- Efficient Deck Sorting: Sorting the master deck in the game typically occurs every frame. This mod changes that behavior, ensuring that sorting only happens when it’s truly necessary, which is a significant optimization for decks with a very large number of cards.
- Compendium Upgrade Rendering: The way upgraded cards are displayed in the compendium has been overhauled. Instead of duplicating and upgrading cards on the fly every frame, Optimize the Spire stores and renders pre-upgraded variants only when needed, while also actively managing its storage to prevent memory bloat. This can be a substantial improvement for users experiencing compendium-related performance issues.
- Run History Loading Optimization: When accessing run history, the game traditionally iterates through all save files. This mod optimizes this process by intelligently filtering save files based on available characters, preventing lag when opening run history, especially with a large number of modded characters installed.
While the impact of each individual change might vary, the cumulative effect of Optimize the Spire can lead to a noticeably smoother and more enjoyable Slay the Spire experience, particularly in complex modded environments.
