GithubHelp home page GithubHelp logo

Comments (4)

GeopJr avatar GeopJr commented on June 2, 2024 2

Do I need to compile Tuba with certain flags to have debug logs?

No, latest glib versions seem to have broken it 🙃 🙃 Was wrong

I noticed that memory consumption is constantly growing, and reloading (Ctrl+R) my timeline does not seem to make any difference.

This feels like a regression, I'll take a closer look, thanks!

As the memory use increases, responsiveness decreases too, although reloading the timeline seems to help with the responsiveness, at least.

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:
Timelines use ListBoxes to display the posts. ListBoxes are not meant to be filled with thousands of widgets as they all stay in memory (this is what causes the UI to 'lag' when there are too many posts in the timeline but 'unlag' when you refresh).

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:

  • You can't have multiple different widgets at the same time. For example on profiles, Tuba has a cover widget at the top with profile info and then post widgets below it. 2 different types of widgets.[1]
  • Accessibility. For some unknown to me reason, you can't tab cycle through complicated nested widgets.[2]

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

#179 #500 #724 #504

(I've been very frustrated with this which might come across in some of my messages on the issues 😓)

from tuba.

GeopJr avatar GeopJr commented on June 2, 2024 1

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 🤷)

from tuba.

algernon avatar algernon commented on June 2, 2024

Small update: I have restarted my Tuba with G_MESSAGES_DEBUG=Tuba dev.geopjr.Tuba, but for the past ~hour, I only saw two warning messages, nothing else. It is running through a wrapper that makes it find stuff (because NixOS), but I verified that G_MESSAGES_DEBUG=Tuba is present in its environment nevertheless.

Do I need to compile Tuba with certain flags to have debug logs?

from tuba.

algernon avatar algernon commented on June 2, 2024

If I can provide more information or assistance, let me know, and I'll try my best to help!

from tuba.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.