discourse/spec/models/concerns
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
..
reports 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
has_post_upload_references_spec.rb FEATURE: Add support for uploads on translated posts (#35871) 2025-11-12 08:55:21 -08:00
reviewable_action_builder_spec.rb DEV: Don't use fab! for non-ActiveRecord model objects (#39272) 2026-04-15 00:52:34 +02:00