Skip to content

Optimize log rendering with data point sampling for large datasets#4

Merged
mrsndmn merged 1 commit intomainfrom
claude/optimize-log-rendering-kXL2S
Jan 20, 2026
Merged

Optimize log rendering with data point sampling for large datasets#4
mrsndmn merged 1 commit intomainfrom
claude/optimize-log-rendering-kXL2S

Conversation

@mrsndmn
Copy link
Owner

@mrsndmn mrsndmn commented Jan 20, 2026

  • Add MAX_PLOT_POINTS constant (1000) as sampling threshold
  • Implement _sample_data() method using uniform sampling strategy
  • Apply sampling in plot() after smoothing but before rendering
  • Preserve first and last points to maintain visual range accuracy
  • Keep original values for y-range tracking to ensure accurate xlim/ylim
  • Add comprehensive tests for sampling functionality

This optimization improves rendering performance for log files with more
than 1000 data points while maintaining visual fidelity.

- Add MAX_PLOT_POINTS constant (1000) as sampling threshold
- Implement _sample_data() method using uniform sampling strategy
- Apply sampling in plot() after smoothing but before rendering
- Preserve first and last points to maintain visual range accuracy
- Keep original values for y-range tracking to ensure accurate xlim/ylim
- Add comprehensive tests for sampling functionality

This optimization improves rendering performance for log files with more
than 1000 data points while maintaining visual fidelity.
@mrsndmn mrsndmn merged commit 689053a into main Jan 20, 2026
1 check passed
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