Skip to content

v2.5.0

Choose a tag to compare

@538Michael 538Michael released this 20 Feb 04:24
· 4 commits to master since this release

What's Changed

  • Comprehensive performance optimization pass across the entire mod, targeting per-frame heap allocations, LINQ overhead, redundant computations, and unnecessary object creation in hot render/tick paths.

Highlights

  • Eliminated LINQ usage (.Where(), .Any(), .Select(), .Count(), .OrderBy(), .SequenceEqual()) from all render and tick paths, replacing with foreach loops and direct property checks
  • Cached MeasureString results for NPC names, price text, bundle banner widths, and level-up text to avoid repeated per-frame font measurements
  • Reused ClickableTextureComponent instances across frames instead of allocating new ones every frame for weather icons, Robin status, seasonal berry, Queen of Sauce, traveling merchant, and birthday icons
  • Implemented dirty flag pattern for birthday icons to avoid recreating UI components every frame
  • Cached formatted strings (ToString(), I18n calls, daily luck text) to avoid per-frame string allocations
  • Replaced per-animal string allocations in render loops with direct comparisons
  • Pre-computed static day sets for game state query evaluation
  • Reused StringBuilder, List, and Dictionary collections across frames via Clear() instead of allocating new ones
  • Cached TitleSafeArea viewport lookups in local variables
  • Fixed MeasureString width calculation using .X instead of .Length() (vector magnitude)

Full Changelog: v2.4.0...v2.5.0