lemmy icon indicating copy to clipboard operation
lemmy copied to clipboard

Lemmy's All tab will randomly start spamming Active posts which dont seem to be active

Open iodream opened this issue 1 year ago • 3 comments

  • [x] Did you check to see if this issue already exists?
  • [x] Is this only a single bug? Do not put multiple bugs in one issue.
  • [x] Is this a question or discussion? Don't use this, use https://lemmy.ml/c/lemmy_support . Not a question
  • [x] Is this a UI / front end issue? Use the lemmy-ui repo. Doesn't seem like a ui issue

Issue Summary

When i'm viewing/scrolling through the Active posts on the All tab Lemmy will suddenly and randomly start spamming me with posts which often have no comments or upvotes at all and will often be months or years old.

Steps to Reproduce

  1. Be on the All tab viewing Active posts
  2. It should happen after some time

I've recorded a short demo:

https://github.com/LemmyNet/lemmy/assets/42720874/c95fb84f-8e47-40a3-a921-306532ec9837

Technical details

I'm using the lemmy.ml instance

My browser console is being spammed with these logs when it quieted down a bit: image

iodream avatar Jun 10 '23 14:06 iodream

This is happening constantly and is super annoying, it makes the main feed basically unusable as it just jumps around constantly and has no logic to it at all.

It's not the CreatePostLike operation that does add new posts thoguh, it is actually "CreatePost" which seems to randomly happen for no reason at all the entire time:

image

molkemon avatar Jun 12 '23 09:06 molkemon

Lemmy seems to append new posts to the post list whenever a CreatePost message comes through, no matter what. I think the intended behavior is that this should only happen when sorting by New? Otherwise just ignore any CreatePost messages.

marshoepial avatar Jun 12 '23 15:06 marshoepial

I've also noticed this. The posts aren't strictly newer ones either, sometimes they're months or years old. They usually come in waves, where all of the posts in that wave are from the same community. I feel like this might be caused by the instance discovering a new community or updating it's data on an already known community, but for some reason the data also gets pushed to users.

New posts should probably never even be added to your feed automatically. They should only change if you refresh the page.

This is also a pretty big problem if you leave lemmy open in a tab in your browser, it quickly eats all of your RAM.

Redex68 avatar Jun 12 '23 15:06 Redex68

I think it is related to this file

https://github.com/LemmyNet/lemmy/blob/main/crates/routes/src/feeds.rs

I am not super familiar with the codebase but I am a software engineer for my job, and the way it is getting the feed by community is likely causing the issue since it seems to populate one community at a time.

Gimmley avatar Jun 12 '23 20:06 Gimmley

This is from websocket. Will be removed in 0.18.0

Nutomic avatar Jun 12 '23 21:06 Nutomic