mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 02:45:39 -04:00
Replace nested loop queries with batch fetches using inArray() across discovery, tracking, metadata, settings, and system-health services. The biggest win is getContinueWatchingFeed() going from ~375+ queries to 5. Add a cached getSession() wrapper via React.cache() to deduplicate auth lookups shared between layouts and pages. Parallelize independent async operations in importTitle(), cacheImagesJob(), and the explore page. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>