discourse/app
Alan Guo Xiang Tan 3c0e672fc4
PERF: PostTiming.pretend_read to not update TopicUser cache columns (#27201)
This commit splits out the updating of `TopicUser#last_read_post_number` in
`TopicUser.ensure_consistency!` to a new
`TopicUser.update_last_read_post_number` method` which
`PostTiming.pretend_read` will now call instead. Previously,
`PostTiming.pretend_read` calls `TopicUser.ensure_consistency!` which in
turn calls `TopicUser.update_post_action_cache` but that is
unnecessary for `PostTiming.pretend_read` since `PostTiming.pretend_read` does not
affect the `TopicUser#liked` or `TopicUser.bookmarked` columns which
`TopicUser.update_post_action_cache` updates. As the query in
`TopicUser.update_post_action_cache` can be expensive, we should avoid
calling it when it isn't necessary.

One such scenario where it is unnecessary is when we are closing a
topic.
2024-05-27 19:56:33 +08:00
..
assets Build(deps-dev): Bump glob from 10.3.16 to 10.4.1 (#27186) 2024-05-27 11:41:43 +02:00
controllers FEATURE: topic_view_stats table with daily fidelity (#27197) 2024-05-27 15:25:32 +10:00
helpers FIX: Include HTML content for authenticated users with crawler UA (#26757) 2024-04-25 22:41:57 +01:00
jobs DEV: Move webhook event header modifier for redelivery-recalucation (#27177) 2024-05-24 10:37:10 -05:00
mailers FIX: send activity summaries based on "last seen" (#27035) 2024-05-22 10:23:03 +02:00
models PERF: PostTiming.pretend_read to not update TopicUser cache columns (#27201) 2024-05-27 19:56:33 +08:00
serializers FIX: flaky post action counts specs (#27165) 2024-05-24 11:55:32 +10:00
services DEV: Move webhook event header modifier for redelivery-recalucation (#27177) 2024-05-24 10:37:10 -05:00
views FIX: send activity summaries based on "last seen" (#27035) 2024-05-22 10:23:03 +02:00