Skip to content

Conversation

@servantftransperfect
Copy link
Contributor

This pull request updates the Statistics class in meshroom/core/stats.py to improve memory efficiency by limiting the number of stored data points and dynamically adjusting the sampling interval. The changes introduce a mechanism to filter and downsample collected statistics, ensuring that performance and memory usage remain stable over long-running sessions.

Data retention and interval management improvements:

  • Added a maxPoints parameter to the Statistics class to limit the number of stored data points and implemented logic in update to double the sampling interval and downsample the data when this limit is exceeded. [1] [2]
  • Introduced the _filterDataPoints method to efficiently downsample the times, computer.curves, and process.curves data structures when the maximum number of points is reached.
  • Added maxPoints and baseInterval attributes to the class, and included them in serialization (toDict) and deserialization (fromDict) to ensure persistence across sessions. [1] [2]

@codecov
Copy link

codecov bot commented Jan 22, 2026

Codecov Report

❌ Patch coverage is 33.33333% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.70%. Comparing base (cca5cc5) to head (91261e9).
⚠️ Report is 5 commits behind head on develop.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
meshroom/core/stats.py 33.33% 12 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2985      +/-   ##
===========================================
- Coverage    79.80%   79.70%   -0.11%     
===========================================
  Files           64       64              
  Lines         8674     8690      +16     
===========================================
+ Hits          6922     6926       +4     
- Misses        1752     1764      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants