Skip to content

perf: reduce dashboard loading overhead - #3128

Merged
tabuna merged 1 commit into
masterfrom
codex/reduce-dashboard-loading-overhead
Aug 18, 2026
Merged

perf: reduce dashboard loading overhead#3128
tabuna merged 1 commit into
masterfrom
codex/reduce-dashboard-loading-overhead

Conversation

@tabuna

@tabuna tabuna commented Aug 18, 2026

Copy link
Copy Markdown
Member

Summary

  • count unread notifications in SQL instead of hydrating the relation
  • cap the initial badge query at 10 because the frontend replaces two-digit counts with an indicator
  • fetch only notification IDs and remove unnecessary notification ordering
  • preserve custom notification relations by avoiding a hard-coded table name
  • cover the numeric-to-indicator transition with a Dusk test
  • create notification fixtures declaratively through a dedicated test factory
  • lazily load example images

Tests

  • php vendor/bin/pint --test src/Platform/Components/Notification.php src/Platform/Http/Controllers/NotificationController.php tests/Feature/Platform/NotificationTest.php tests/Browser/NotificationTest.php tests/Database/Factory/DatabaseNotificationFactory.php
  • php vendor/bin/phpunit tests/Feature/Platform/NotificationTest.php
  • php vendor/bin/phpunit --testsuite=Browser --filter=NotificationTest --no-coverage

@tabuna
tabuna force-pushed the codex/reduce-dashboard-loading-overhead branch 3 times, most recently from 8a8e07d to 4e5736d Compare August 18, 2026 14:41
@tabuna
tabuna force-pushed the codex/reduce-dashboard-loading-overhead branch from 4e5736d to 6211f44 Compare August 18, 2026 14:45
@tabuna
tabuna merged commit f51f640 into master Aug 18, 2026
58 of 62 checks passed
@tabuna
tabuna deleted the codex/reduce-dashboard-loading-overhead branch August 18, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant