diff --git a/sunnypilot/common/README.md b/sunnypilot/common/README.md index 77c74e9bad..5c56bb4ceb 100644 --- a/sunnypilot/common/README.md +++ b/sunnypilot/common/README.md @@ -90,8 +90,6 @@ ParamWatcher was 14.5x faster: 4.52s vs. 65.43s to complete ~10 million param ge ### Scalability No degradation at scale; cache invalidation maintained freshness. -See Appendix A for visual graphs of memory usage over a 30-minute time span, captured on comma four. These two routes are of equal conditions: each route started completely unplugged to two minutes offroad, followed by onroad state, with ambient temperature at 75 degrees fahrenheit. These routes are direct comparisons of pre-ParamWatcher and ParamWatcher implementations. Appendix A also includes I/O capture graphs for those 30-minute routes, demonstrating reductions in file system activity post-ParamWatcher. - ## Discussion ParamWatcher successfully optimizes parameter access, delivering substantial CPU gains with minimal memory overhead. The event-driven approach eliminates I/O bottlenecks, reducing GC pressure and UI stutters (cppreference.com, n.d.-b). The 17 KB memory overhead is negligible compared to the megabytes of churn from base Params, ensuring bounded usage in multi-process environments via the singleton pattern (Gamma et al., 1994). @@ -100,21 +98,6 @@ Results demonstrate scalability without degradation, with cache invalidation mai Limitations include potential event latency in high-load scenarios (<10 ms, imperceptible for UI) and increased complexity from background threads. Trade-offs: Static RAM (~17 KB) vs. dynamic churn; benefits outweigh costs for param-heavy workloads. -##
Appendix A: Memory Usage Graphs - -### Base Params Memory Usage -![Base Params Memory Usage](assets/memory_usage_pre_paramwatcher.jpg) - -### ParamWatcher Memory Usage -![ParamWatcher Memory Usage](assets/memory_usage_00000025--d50a4a3471.jpg) - -### Base Params IO Usage -![Base Params IO Usage](assets/io_usage_pre_paramwatcher.jpg) - -### ParamWatcher IO Usage -![ParamWatcher IO Usage](assets/io_usage_param_watcher.jpg) - - ##
References Apple Inc. (n.d.-a). *File System Events*. Retrieved from https://developer.apple.com/documentation/coreservices/file_system_events diff --git a/sunnypilot/common/assets/io_usage_param_watcher.jpg b/sunnypilot/common/assets/io_usage_param_watcher.jpg deleted file mode 100644 index 4731a4d236..0000000000 Binary files a/sunnypilot/common/assets/io_usage_param_watcher.jpg and /dev/null differ diff --git a/sunnypilot/common/assets/io_usage_pre_paramwatcher.jpg b/sunnypilot/common/assets/io_usage_pre_paramwatcher.jpg deleted file mode 100644 index 6bd0407844..0000000000 Binary files a/sunnypilot/common/assets/io_usage_pre_paramwatcher.jpg and /dev/null differ diff --git a/sunnypilot/common/assets/memory_usage_00000025--d50a4a3471.jpg b/sunnypilot/common/assets/memory_usage_00000025--d50a4a3471.jpg deleted file mode 100644 index 3a67f345c6..0000000000 Binary files a/sunnypilot/common/assets/memory_usage_00000025--d50a4a3471.jpg and /dev/null differ diff --git a/sunnypilot/common/assets/memory_usage_pre_paramwatcher.jpg b/sunnypilot/common/assets/memory_usage_pre_paramwatcher.jpg deleted file mode 100644 index 3e17e20ca1..0000000000 Binary files a/sunnypilot/common/assets/memory_usage_pre_paramwatcher.jpg and /dev/null differ