0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-09 21:45:25 +08:00
discourse/spec/models/concerns/reports
Natalie Tay e6a583fa12
PERF: Improve activity by category report by doing it one-pass across the (e.g.) 2 year date period (#40945)
Similar to https://github.com/discourse/discourse/pull/40705, also do
1-pass (e.g. `[2.years.ago, now]` then split) instead of 2-pass
(`[1.year.ago, now]`, `[2.years.ago, 1.year.ago]`) to improve perf on
new dash.

| Period | before (first / min) | after (first / min) | approx delta |
|--------|---------------------:|--------------------:|------:|
| 1yr | 1290.9 / 874.0 ms | 1284.4 / 564.1 ms | −35% |
| 3mo | 875.3 / 840.5 ms | 335.4 / 238.3 ms | −72% |
| 30d | 287.2 / 286.6 ms | 199.3 / 160.5 ms | −44% |
| 7d  | 138.2 / 130.7 ms | 72.3 / 72.3 ms | −45% |

(I know, that 1 yr is sus, but let's see)
2026-06-16 23:45:06 +08:00
..
activity_by_category_spec.rb PERF: Improve activity by category report by doing it one-pass across the (e.g.) 2 year date period (#40945) 2026-06-16 23:45:06 +08:00
associated_accounts_by_provider_spec.rb FIX: Reject DiscourseConnect SSO payloads when secret is blank (#40830) 2026-06-12 15:17:16 +03:00
posters_by_member_type_spec.rb FEATURE: Who's posting section of the dashboard engagement section (#40225) 2026-05-22 12:46:32 +08:00
trust_level_pipeline_spec.rb