discourse/app
Rafael dos Santos Silva d4e35f50c2
PERF: Update like count in visible posts without an extra GET per like (#14869)
PERF: Update like count in visible posts without an extra GET per like

Currently when a user is reading a topic and some post in it receive a
like from another user, the Ember app will be notified via MessageBus
and issue a GET to `/posts/{id}` to get the new like count. This worked
fine for us until today, but it can easily create a self-inflicted DDoS
when a topic with a large number of visitors gets a large number of
likes, since we will issue `visitors * likes` GET requests requests.

This patch optimizes this flow, by sending the new like count down in
the MessageBus notification, removing any need for the extra request.

It shouldn't cause any drift on the count because we send down the full
count instead of the difference too.

Possible follow-ups could include handling like removal.
2021-11-10 13:22:26 -03:00
..
assets PERF: Update like count in visible posts without an extra GET per like (#14869) 2021-11-10 13:22:26 -03:00
controllers DEV: Limit list multipart parts to 1 (#14853) 2021-11-10 08:01:28 +10:00
helpers DEV: Allow actions to change the manifest endpoint (#14522) 2021-10-06 15:41:52 -05:00
jobs FIX: insert commas even when field value is null (#14791) 2021-11-02 14:59:24 +05:30
mailers FIX: Do not show recipient user in email participants list (#14642) 2021-10-19 15:26:22 +10:00
models FEATURE: Add read-only scope to API keys (#14856) 2021-11-10 17:48:00 +02:00
serializers FIX: rename action_code_href to action_code_path (#14834) 2021-11-08 14:32:17 +11:00
services FIX: Ensure CORS rules exist for S3 using rake task (#14802) 2021-11-08 09:16:38 +10:00
views FIX: rename action_code_href to action_code_path (#14834) 2021-11-08 14:32:17 +11:00