Performance improvements#149
Conversation
There was a problem hiding this comment.
Pull request overview
This PR focuses on reducing user-perceived latency in the web app (route chunk preloading + loader cache revalidation), improving operational safety of MongoDB migrations under concurrent startup, and enabling additional compression/caching in the delivery stack. It also removes the queries field/metrics plumbing from the Account model across backend + generated clients.
Changes:
- Add preloadable lazy routes and wire hover/focus/touch preloading into navigation components.
- Make protected-route loaders return Zustand-cached data on warm navigations and revalidate in the background.
- Improve MongoDB migration locking/observability (advisory lock + TTL cleanup + better dirty/locked error surfacing) and add HTTP compression/caching changes.
Reviewed changes
Copilot reviewed 18 out of 21 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/moddns_client/moddns/models/model_subscription.py | Add legacy type field to subscription model for backward compatibility. |
| tests/moddns_client/moddns/models/model_account.py | Remove queries from generated test client model. |
| libs/store/migrator/migrator.go | Add advisory locking, TTL index for lock cleanup, improved migrate logging and error handling. |
| app/src/pages/navigation_menu/NavigationMenu.tsx | Trigger route chunk preloading on hover/focus/touch for nav items. |
| app/src/lib/lazyWithRetry.ts | Add preload() support and in-flight promise memoization for lazy imports. |
| app/src/components/navigation/BottomNav.tsx | Trigger route chunk preloading on hover/focus/touch for bottom nav. |
| app/src/App.tsx | Add routePreload map, background store revalidation for warm navigations, and export preloader map. |
| app/src/api/client/api.ts | Remove queries from generated TS API model. |
| app/nginx.conf | Enable gzip and add long-lived caching for content-hashed static assets. |
| api/service/service.go | Remove GetAccountMetrics from AccountServicer interface. |
| api/service/account/service_test.go | Remove GetAccountMetrics tests/mocks from account service tests. |
| api/service/account/account.go | Stop populating account Queries and remove GetAccountMetrics implementation. |
| api/model/account.go | Remove Queries field and related limit/helper. |
| api/mocks/servicer.go | Remove mocked GetAccountMetrics method. |
| api/mocks/account_servicer.go | Remove mocked GetAccountMetrics method. |
| api/docs/swagger.yaml | Remove queries from swagger model definition. |
| api/docs/swagger.json | Remove queries from generated swagger JSON. |
| api/docs/docs.go | Remove queries from embedded swagger docs template. |
| api/db/mongodb/migrations/018_profiles_account_id_index.up.json | Add index on profiles.account_id. |
| api/db/mongodb/migrations/018_profiles_account_id_index.down.json | Drop index on profiles.account_id. |
| api/api/server.go | Enable Fiber compression middleware for API responses. |
Files not reviewed (3)
- api/docs/docs.go: Language not supported
- api/mocks/account_servicer.go: Language not supported
- api/mocks/servicer.go: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
…ory) Signed-off-by: Maciek <tomczukmaciej@gmail.com>
b5cb59d to
e6e5116
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 25 changed files in this pull request and generated 4 comments.
Files not reviewed (3)
- api/docs/docs.go: Language not supported
- api/mocks/account_servicer.go: Language not supported
- api/mocks/servicer.go: Language not supported
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 25 changed files in this pull request and generated 1 comment.
Files not reviewed (3)
- api/docs/docs.go: Language not supported
- api/mocks/account_servicer.go: Language not supported
- api/mocks/servicer.go: Language not supported
PR type
What kind of change does this PR introduce?