Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize OxyPlot for Real-time Rolling Charts (specifically to our use-case) #42

Open
silahian opened this issue Feb 19, 2025 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@silahian
Copy link
Collaborator

Problem: Current OxyPlot implementation for real-time rolling charts (sub-millisecond updates) causes excessive .NET GC due to frequent point addition/removal, leading to performance bottlenecks.

Proposed Actions:

  • Fork OxyPlot Project: Create a fork of the OxyPlot charting library to enable custom modifications.

  • Analyze Current Memory Usage: Profile the existing OxyPlot implementation under real-time rolling chart conditions to pinpoint memory allocation hotspots and GC triggers.

  • Implement Memory Queue for Data Points: Explore and implement using a memory queue (or similar efficient data structure) to manage incoming data points. Design the queue to minimize object creation/destruction during point updates.

  • Implement Object Pooling for Data Points: Introduce object pooling or object reusability techniques for data point objects to reduce allocation overhead and GC pressure.

  • Iterative Optimization & Testing: Develop and test different memory management strategies iteratively. Continuously benchmark performance, focusing on GC metrics and chart update rates.

  • Performance Benchmarking: Establish performance benchmarks to quantitatively measure the improvement in GC pressure and real-time plotting performance achieved through the modifications.

  • Document Modifications: Document all implemented code changes and the chosen memory optimization strategy for future maintenance and understanding.

Objective: Achieve acceptable real-time chart performance by reducing GC load through optimized memory management in OxyPlot, following the actions listed above.

@silahian silahian added enhancement New feature or request help wanted Extra attention is needed labels Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant