Summary
Enhance rendering performance using modern R performance packages.
Current State
- Rendering works but could be faster
- Using base R for computation
- Single-threaded execution
Proposed Enhancements
1. data.table
- Replace data frame operations with data.table for faster manipulation
- Memory-efficient operations on spiral point data
2. future + furrr
- Parallel computation for Voronoi tessellation
- Non-blocking async operations
- Better utilization of multi-core CPUs
3. Rcpp
- C++ implementation of hot paths:
- Fermat spiral point generation
- Coordinate transformations
- Bounded cell filtering
- Potential 10-100x speedup for computation-heavy operations
Implementation Plan
Dependencies to Add
renv::install(c("data.table", "future", "furrr", "Rcpp"))
Files to Modify
R/utils/spiral_math.R - Core computation
R/modules/ui_plot.R - Rendering pipeline
- New:
src/ folder for Rcpp code
Labels
enhancement, performance
Summary
Enhance rendering performance using modern R performance packages.
Current State
Proposed Enhancements
1. data.table
2. future + furrr
3. Rcpp
Implementation Plan
Dependencies to Add
Files to Modify
R/utils/spiral_math.R- Core computationR/modules/ui_plot.R- Rendering pipelinesrc/folder for Rcpp codeLabels
enhancement, performance