android-compose-realtime
CommunityRender 25Hz+ real-time Compose dashboards smoothly
Software Engineering#performance#canvas#jetpack compose#stateflow#recomposition#real-time ui#derivedstateof
Authordrewid74
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Jetpack Compose can trigger expensive recompositions when high-frequency data streams are read directly inside composables, causing UI jank and unstable rendering at sensor/telemetry rates.
Core Features & Use Cases
- Granular State Management: Avoid collecting whole telemetry frames in a single composable by splitting StateFlow into per-metric StateFlows and applying
distinctUntilChanged()to prevent unnecessary recomposition. - Derived UI Values: Use
derivedStateOfto recompute and re-render only when the derived result changes, not on every upstream update. - Stable Data Patterns: Apply
@Immutableand@Stableto data classes and state containers to reduce conservative recomposition behavior. - Canvas-Based Gauges & Graphs: Render gauges and live line graphs using
Canvasso drawing work stays in the draw phase with minimal composition churn. - Lifecycle-Safe Flow Collection: Prefer
collectAsStateWithLifecyclefor StateFlow-to-Compose wiring, preventing leaks and unwanted updates.
Quick Start
Optimize a Compose real-time dashboard that updates at 25Hz or faster by splitting the telemetry stream into per-metric StateFlows, filtering with distinctUntilChanged(), and rendering gauges/graphs with Canvas and derived state.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: android-compose-realtime Download link: https://github.com/drewid74/ai_skills/archive/main.zip#android-compose-realtime Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.