-
-
Notifications
You must be signed in to change notification settings - Fork 64
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]: Long-running Tuba leaks memory #798
Comments
Small update: I have restarted my Tuba with Do I need to compile Tuba with certain flags to have debug logs? |
This feels like a regression, I'll take a closer look, thanks!
Okay this is a huge discussion which has been an issue since forever and don't think it's going to be resolved anytime soon. It has been blocking me from implementing most timeline related requests. I'll link below some places it has been discussed on but the TLDR is: GTK4 introduced ListViews (mostly for Nautilus afaik). They are recycler views, re-using the same widgets as you scroll instead of generating new ones. That also means that they do not stay in memory as widgets like images get destroyed as you scroll. ListViews however have some big disadvantages:
Some versions ago, I did convert everything to ListViews. I got over [1] by creating the widgets on the "binding" stage (which was terrible as it basically removed any benefit the recycler had). But after discovering the accessibility issues I just reverted it. It's not wroth it. Code for it still exists in Tuba behind a flag. The main suggestion I've been given is to just create my own recycler view but that is going to take a while: https://tech.lgbt/@GeopJr/111762122652180106 (I've been very frustrated with this which might come across in some of my messages on the issues 😓) |
If I can provide more information or assistance, let me know, and I'll try my best to help! |
I found the main leak! Though it might not fix everything (Vala lambdas sometimes self ref and cause the widgets to not be destroyed, 99% of all leaks are due to this 🤷) |
Describe the bug
I usually leave my computer running for the night for various reasons, and as such, Tuba is left running too. I noticed that memory consumption is constantly growing, and reloading (
Ctrl+R
) my timeline does not seem to make any difference. As the memory use increases, responsiveness decreases too, although reloading the timeline seems to help with the responsiveness, at least.I have to restart Tuba daily to keep things under control. Not a big deal, but a minor annoyance nevertheless.
Steps To Reproduce
Logs and/or Screenshots
No logs yet, but next time I restart Tuba (after I finished writing this report), I'll start it with debug logs enabled.
I did take a few snapshots of memory usage, as shown in
top
, though:Instance Backend
glitch-soc
Operating System
NixOS 23.11
Package
Compiled manually
Troubleshooting information
My Tuba is compiled from 1933edf, but the problem existed before too (with 0.6.3 + #728 applied on top).
Additional Context
No response
The text was updated successfully, but these errors were encountered: