discourse/plugins
Andrei Prigorshnev a32fce9e1d
FIX: Further optimize mentioning groups in chat messages (part 2) (#24185)
This is a follow-up to e6299a3. I additionally fixed these three things:

1. Since e6299a3 there's no need anymore to join the group_users table 
when looking for users who were reached by a group mention, so 
I removed that join in that commit. But turned out we were joining 
the group_users table twice, so I removed the second join in this PR. 
That drastically speeded up my test query, from 6 sec to 0.26 sec.
2. We also were joining twice the user_chat_channel_memebership table, 
so I removed the second unnecessary join too.
3. We actually need to join the user_chat_channel_memebership table 
only in certain cases, and we don't need to do that for group mentions, 
so I fixed that too.

As a result of these changes, time of my test query fall down from 
6 sec to 0.001 sec. And the resulting SQL query now contains only 
one JOIN statement.
2023-11-01 17:05:54 +04:00
..
chat FIX: Further optimize mentioning groups in chat messages (part 2) (#24185) 2023-11-01 17:05:54 +04:00
checklist DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
discourse-details DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
discourse-lazy-videos FIX: Add rel=0 to youtube lazy videos url (#24173) 2023-10-31 08:04:23 -03:00
discourse-local-dates DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
discourse-narrative-bot DEV: Change anonymous_posting_min_trust_level to a group-based setting (#24072) 2023-10-25 11:45:10 +10:00
discourse-presence DEV: Sort imports 2023-10-10 21:46:54 +01:00
footnote DEV: Remove deprecated queue_jobs site setting (#24127) 2023-10-27 11:05:02 +08:00
poll DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
spoiler-alert Update translations (#24078) 2023-10-24 15:53:34 +02:00
styleguide FIX: Correct import path in styleguide (#24092) 2023-10-25 12:13:38 +01:00