Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Memory leak #824

Closed
greydot opened this issue Mar 7, 2024 · 3 comments
Closed

[Bug]: Memory leak #824

greydot opened this issue Mar 7, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@greydot
Copy link

greydot commented Mar 7, 2024

Describe the bug

Just that. Huge memory leak when viewing the main timeline. Both v0.6.3 and the latest git (1ffa7cd) are affected.

Steps To Reproduce

  1. Open Tuba
  2. Scroll down continuously, regardless of how fast everything loads
  3. Observe the leak

Logs and/or Screenshots

Console logs:

(dev.geopjr.Tuba:175979): Gtk-WARNING **: 10:00:28.276: Unknown key gtk-button-images in /home/void/.config/gtk-4.0/settings.ini

(dev.geopjr.Tuba:175979): Gtk-WARNING **: 10:00:28.276: Unknown key gtk-menu-images in /home/void/.config/gtk-4.0/settings.ini

(dev.geopjr.Tuba:175979): Gtk-WARNING **: 10:00:28.276: Unknown key gtk-modules in /home/void/.config/gtk-4.0/settings.ini

(dev.geopjr.Tuba:175979): Gtk-WARNING **: 10:00:28.276: Unknown key gtk-toolbar-style in /home/void/.config/gtk-4.0/settings.ini

** (dev.geopjr.Tuba:175979): CRITICAL **: 10:00:30.437: Network.vala:77: Request "https://stereophonic.space/api/v1/announcements" failed: 404 Not Found

:1: HTML parser error : Document is empty

^
:1: HTML parser error : Document is empty

^
:1: HTML parser error : Document is empty

^
:1: HTML parser error : Document is empty

^
:1: HTML parser error : Document is empty

^
:1: HTML parser error : Document is empty

^
:1: HTML parser error : Document is empty

^
:1: HTML parser error : Document is empty

^
:1: HTML parser error : Document is empty

^
:1: HTML parser error : Document is empty

^
:1: HTML parser error : Document is empty

^
:1: HTML parser error : Document is empty

^
:1: HTML parser error : Document is empty

^

(dev.geopjr.Tuba:175979): Gtk-WARNING **: 10:00:55.122: GtkLabel 0x1fea9ba0 (label) reported min width 24 and natural width 15 in measure() with for_size=30; natural size must be >= min size

(dev.geopjr.Tuba:175979): Gtk-WARNING **: 10:00:55.344: GtkLabel 0x1fea9ba0 (label) reported min width 24 and natural width 15 in measure() with for_size=30; natural size must be >= min size

:1: HTML parser error : Document is empty

^
:1: HTML parser error : Document is empty

^
:1: HTML parser error : Document is empty

^

  

Instance Backend

Pleroma

Operating System

NixOS Unstable

Package

OS repositories

Troubleshooting information

No response

Additional Context

No response

@greydot greydot added the bug Something isn't working label Mar 7, 2024
@GeopJr
Copy link
Owner

GeopJr commented Mar 7, 2024

Thanks for the report!

Just to make sure, this is the main/"Home" timeline right?

If that's so, that's unfortunately expected. The TL:DR is #798 (comment) but here's another: Due to the lists used in timelines, nothing gets freed based on scroll position, but the current alternatives have other limitations and issues.

If that's the case then I'll close this, since it doesn't add anything to the already open ones on this matter

@greydot
Copy link
Author

greydot commented Mar 9, 2024

Just to make sure, this is the main/"Home" timeline right?

Yes.

Due to the lists used in timelines, nothing gets freed based on scroll position, but the current alternatives have other limitations and issues.

I mean, sure. But a gigabyte of memory just to store a hundred or so posts? That's a bit of a stretch, isn't it?

@GeopJr
Copy link
Owner

GeopJr commented Mar 9, 2024

But a gigabyte of memory just to store a hundred or so posts? That's a bit of a stretch, isn't it?

Maybe, maybe not. Nothing comes for free, complex widgets, images, network cache, websockets, json deserialization, html to native widgets convertion... are some of the many layers a timeline is under, it's not just 'storing a few posts'. Per the linked issues, the ideal solution is to move to a recycler list, like ListViews, so everything gets destroyed and freed as the scrolling position changes.

If you manage to find areas where the current implementation can improve, let me know! In the meantime, I'll go ahead and close this issue as it doesn't provide anything new

@GeopJr GeopJr closed this as not planned Won't fix, can't repro, duplicate, stale Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants