discourse/plugins/chat/app/services/chat
Alan Guo Xiang Tan de79e5628e
PERF: Reduce mem allocation of Chat::AutoRemove::HandleCategoryUpdated (#28393)
This is a follow-up to 671f40ce07 and
ed11ee9d05.

While the optimisations in the previous commits were sound, it did not
resolve the memory bloat we were seeing. It turns out that we call
`.blank?` on the model's result if the model has not been marked
optional. The problem with this is that if the model returns an
ActiveRecord relation, calling `.blank?` on the relation basically loads
everything into memory.

Therefore, this commit removes `users` as a model in the  since it really isn't
a model but just a relation.
2024-08-16 11:35:08 +08:00
..
action PERF: Reduce memory footprint of Chat::AutoRemove::HandleCategoryUpdated.call (#28381) 2024-08-16 05:37:31 +08:00
auto_remove PERF: Reduce mem allocation of Chat::AutoRemove::HandleCategoryUpdated (#28393) 2024-08-16 11:35:08 +08:00
add_users_to_channel.rb FIX: chat direct message group user limit is off by 1 (#27014) 2024-06-03 12:11:49 +04:00
auto_join_channel_batch.rb DEV: Remove the need for splat operator in services 2024-03-07 15:54:37 +01:00
create_category_channel.rb DEV: Remove the need for splat operator in services 2024-03-07 15:54:37 +01:00
create_direct_message_channel.rb FIX: load existing chat dm channel via url (#26998) 2024-05-24 12:12:49 +04:00
create_message.rb FIX: update order of chat message service steps (#27889) 2024-07-12 11:56:07 +04:00
create_thread.rb DEV: Remove the need for splat operator in services 2024-03-07 15:54:37 +01:00
flag_message.rb DEV: Remove the need for splat operator in services 2024-03-07 15:54:37 +01:00
invite_users_to_channel.rb DEV: Remove the need for splat operator in services 2024-03-07 15:54:37 +01:00
leave_channel.rb DEV: Remove the need for splat operator in services 2024-03-07 15:54:37 +01:00
list_channel_messages.rb FIX: do not use return in block (#26260) 2024-03-20 10:49:28 +01:00
list_channel_thread_messages.rb FIX: allows listing messages of any thread (#27259) 2024-05-30 10:20:40 +02:00
list_user_channels.rb PERF: defer loading channels (#26155) 2024-03-18 08:35:07 +01:00
lookup_channel_threads.rb DEV: Remove the need for splat operator in services 2024-03-07 15:54:37 +01:00
lookup_thread.rb DEV: Remove the need for splat operator in services 2024-03-07 15:54:37 +01:00
lookup_user_threads.rb FEATURE: show my threads from muted chat channels (#27468) 2024-06-13 18:39:35 +04:00
mark_all_user_channels_read.rb DEV: Remove the need for splat operator in services 2024-03-07 15:54:37 +01:00
mark_thread_title_prompt_seen.rb FEATURE: encourage users to set chat thread titles (#26617) 2024-04-29 17:20:01 +08:00
message_destroyer.rb DEV: Add last_message_id to channel and thread (#22488) 2023-07-13 10:28:11 +10:00
publisher.rb FIX: do not increment reply count manually (#26769) 2024-04-26 12:32:06 +02:00
restore_message.rb DEV: Remove the need for splat operator in services 2024-03-07 15:54:37 +01:00
search_chatable.rb FEATURE: allow re-scoping chat user search via a plugin (#26361) 2024-03-27 08:55:53 +11:00
stop_message_streaming.rb FIX: allows bots to create/update/stream messages (#26900) 2024-05-07 15:17:42 +02:00
tracking_state.rb DEV: Remove the need for splat operator in services 2024-03-07 15:54:37 +01:00
trash_channel.rb DEV: Remove the need for splat operator in services 2024-03-07 15:54:37 +01:00
trash_message.rb FEATURE: Allow to bulk delete chat messages (#26586) 2024-05-22 08:57:00 -03:00
trash_messages.rb FEATURE: Allow to bulk delete chat messages (#26586) 2024-05-22 08:57:00 -03:00
unfollow_channel.rb DEV: Remove the need for splat operator in services 2024-03-07 15:54:37 +01:00
update_channel_status.rb DEV: Remove the need for splat operator in services 2024-03-07 15:54:37 +01:00
update_channel.rb DEV: Remove the need for splat operator in services 2024-03-07 15:54:37 +01:00
update_message.rb FIX: allows bots to create/update/stream messages (#26900) 2024-05-07 15:17:42 +02:00
update_thread_notification_settings.rb DEV: Remove the need for splat operator in services 2024-03-07 15:54:37 +01:00
update_thread.rb DEV: Remove the need for splat operator in services 2024-03-07 15:54:37 +01:00
update_user_channel_last_read.rb FEATURE: implements last read message for threads (#26702) 2024-04-25 10:47:54 +02:00
update_user_thread_last_read.rb FEATURE: implements last read message for threads (#26702) 2024-04-25 10:47:54 +02:00
upsert_draft.rb DEV: Remove the need for splat operator in services 2024-03-07 15:54:37 +01:00