Skip to content

Performance recorder - Circular buffer, general improvements#582

Merged
notfood merged 2 commits intorwmt:devfrom
DillionLowry:performance-recorder-updates
Jul 20, 2025
Merged

Performance recorder - Circular buffer, general improvements#582
notfood merged 2 commits intorwmt:devfrom
DillionLowry:performance-recorder-updates

Conversation

@DillionLowry
Copy link

This pull request updates the PerformanceRecorder class to replace lists with CircularBuffer for improved memory management and performance tracking, along with other misc improvements.

PerformanceRecorder class changes:

  • Replaced lists with CircularBuffer for performance metrics, allowing for a rolling window of data.
  • Introduced constants MaxSampleCount and NonPerfMetricsFrameInterval to limit buffer size and non-performance metric sample rate.
  • Updated methods for recording metrics to accommodate the new buffer structure.
  • Improved logging functionality with warnings for full sample buffers.

@notfood notfood added enhancement New feature or request. low priority Quality of life or ignorable to an extent. 1.6 Fixes or bugs relating to 1.6 (Not Odyssey). labels Jul 19, 2025
@notfood
Copy link
Member

notfood commented Jul 19, 2025

While this is a purely debuging tool that users won't see, the arbitrary limits seem strange. These constants could be available to change without recompile.

@DillionLowry
Copy link
Author

The idea was to limit it so that the recorder itself doesn't slowly cause performance to degrade. But you're right, I'll add them to debug options.

@DillionLowry
Copy link
Author

Added the options to the debug panel itself to prevent taking up space in the main mod options with settings most users will never use. Went with sliders to prevent capturing key input events while the game is running.

@notfood notfood moved this to In review in 1.6 and Odyssey Jul 20, 2025
@notfood notfood merged commit 9f0dfdd into rwmt:dev Jul 20, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from In review to Done in 1.6 and Odyssey Jul 20, 2025
@notfood notfood moved this to Backlog in Backports Jul 20, 2025
@notfood notfood removed this from Backports Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.6 Fixes or bugs relating to 1.6 (Not Odyssey). enhancement New feature or request. low priority Quality of life or ignorable to an extent.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants