You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've received multiple user reports about performance issues and UI lag in LobeChat, particularly affecting the Windows platform. Users have reported:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
🎯 Background
We've received multiple user reports about performance issues and UI lag in LobeChat, particularly affecting the Windows platform. Users have reported:
Related Issues:
🔍 Problem Analysis
The current Next.js App Router architecture using React Server Components (RSC) has several performance bottlenecks:
💡 Proposed Solution
Migrate key pages from RSC to Single Page Application (SPA) architecture using client-side rendering with SWR/React Query for data fetching.
Benefits
✅ Completed Migrations
We have successfully migrated 2 major sections:
1. Settings Page (PR #8961)
/settingsfor simpler routinguseSettingsStorehook for centralized state managementResult: Noticeably smoother settings page navigation and reduced CPU spikes
2. Discover Page (PR #9828)
react-router-domDiscoverRouterwithMemoryRouterfor client-side navigationuseRouter/usePathnamewithuseNavigate/useLocation📋 Proposed Migration Plan
Based on our successful migrations, we propose to continue migrating the following high-traffic pages:
🎨 Technical Approach
Based on our completed migrations, we'll follow this pattern:
react-router-domwithMemoryRouterfor client-side routinguseSettingsStore)useRouter/Linkwith react-router equivalents📊 Expected Impact
Based on user feedback from our completed migrations:
We expect similar or greater improvements as we migrate the remaining high-traffic pages.
💬 Feedback Welcome
We'd love to hear from the community:
Related PRs:
Beta Was this translation helpful? Give feedback.
All reactions