0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 13:08:40 +08:00
discourse/spec/jobs/scheduled
Krzysztof Kotlarek aab24442ec
PERF: Serve the activity_by_category report from daily rollups (#42046)
Previously, `activity_by_category` aggregated `topics`, `posts` and
`topic_view_stats` across the whole reporting window on every dashboard
request, and because the category filter was only applied after the
join, selecting three categories cost the same as scanning all of them.
On a 600k topic / 4.8M post dataset that was ~440ms per request, per
admin, growing with the site.

This change persists per-day, per-category counts in
`category_activity_daily_rollups` and has the report read only those,
cutting the same query to ~4ms.
`Jobs::MaintainCategoryActivityDailyRollups` refreshes recent days every
three hours, while
`Jobs::RebuildCategoryActivityDailyRollups` recalculates history daily
so topics that are recategorised or deleted after the fact are
reattributed rather than left frozen. Invalidating on change was
rejected because `PostMover`, bulk category actions, imports and rake
tasks all rewrite historical attribution without firing an event.
2026-07-28 12:53:29 +08:00
..
backfill_nested_reply_stats_spec.rb PERF: Add fast nested reply stats preparation (#41870) 2026-07-21 10:45:53 -05:00
check_upcoming_changes_spec.rb FIX: Do not send notifications for upcoming changes not displayed (#40933) 2026-06-17 09:10:49 +10:00
directory_refresh_spec.rb DEV: refresh user directory more often for sites with few users (#39852) 2026-05-08 12:04:03 -04:00
maintain_category_activity_daily_rollups_spec.rb PERF: Serve the activity_by_category report from daily rollups (#42046) 2026-07-28 12:53:29 +08:00
maintain_user_visit_daily_rollups_spec.rb PERF: Use daily rollups for DAU/MAU reports (#41958) 2026-07-24 09:52:40 +08:00
notify_admins_of_available_upcoming_changes_spec.rb FIX: Do not surface upcoming changes owned by unavailable plugins (#41575) 2026-07-13 10:01:52 +10:00
notify_admins_of_problems_spec.rb FEATURE: Add problem checks page to admin panel and allow ignoring problem checks (#39103) 2026-04-23 08:28:33 +08:00
rebuild_category_activity_daily_rollups_spec.rb PERF: Serve the activity_by_category report from daily rollups (#42046) 2026-07-28 12:53:29 +08:00
recalculate_nested_hot_scores_spec.rb FEATURE: Hot algorithm for nested replies (simple) (#41742) 2026-07-20 10:56:05 -05:00