Skip to content

Conversation

@daneden
Copy link
Owner

@daneden daneden commented Jan 28, 2026

No description provided.

@daneden
Copy link
Owner Author

daneden commented Jan 28, 2026

Turns out Solar is much more performant. I may do some investigation into why this is, but likely it's somewhat cheaper to instantiate and update a class compared to recreating the Sun struct on every re-render (e.g. TimeMachine update)

Resolves merge conflicts keeping main branch's refactored view structure
while using SunKit types. Also adds performance optimizations to reduce
Sun instance creation:

- Cache Sun instances in views using @State with onChange for date updates
- Use SunKit's setDate() to avoid recomputing sun events for same-day changes
- Pre-compute Sun in widget timeline entries to eliminate render-time computation
- Add SunKit++ extension methods that accept cached comparator Sun instances

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@daneden daneden closed this Feb 3, 2026
@daneden daneden deleted the refactor/sunkit-migration branch February 3, 2026 15:19
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