Alan Guo Xiang Tan 671f40ce07
PERF: Reduce memory footprint of Chat::AutoRemove::HandleCategoryUpdated.call (#28381)
This is a follow up to ed11ee9d057160e5c1b0d1a86c9e94582d8fafd0.

In `Chat::AutoRemove::HandleCategoryUpdated`, we are currently loading
the related users record in batches and then handing it off to
`Chat::Action::CalculateMembershipsForRemoval.call`. However, we are
still seeing memory spike as a result of this.

This commit eliminates the allocation of `User` ActiveRecord objects until
absolutely necessary. `Chat::Action::CalculateMembershipsForRemoval.call` has been
updated to accept an ActiveRecord relation instead which allows us to
avoid the ActiveRecord allocations.
2024-08-16 05:37:31 +08:00
..
2024-08-13 16:31:24 +02:00

This plugin is still in active development and may change frequently

Documentation

The Discourse Chat plugin adds chat functionality to your Discourse so it can natively support both long-form and short-form communication needs of your online community.

For user documentation, see Discourse Chat.

For developer documentation, see Discourse Documentation.