Giter Club home page Giter Club logo

Comments (6)

ilya-fedin avatar ilya-fedin commented on June 10, 2024

Perhaps this means you have bad cooling? tdesktop draws on CPU so high CPU load is expected. If you don't like this, you can use web version as browsers usually draw with GPU.

from tdesktop.

grepwood avatar grepwood commented on June 10, 2024

@Aokromes it's not completed. You're not helping.
@ilya-fedin this is on NoFan CR-80EH so you can expect the system to idle at 54-63C, this is perfectly normal in such a circumstance. On another system with the same cooler, but one which uses Ryzen 2700 on Gentoo (and thus Telegram Desktop from Portage), this issue does not exist. What codec is used to animate the stickers?

Edit: Sorry, I missed the part about drawing on CPU. Maybe, just maybe, the animation of stickers can be offloaded to OpenGL? What are the prospects for this? https://webhamster.com/ is also drawn on CPU by the browser and there's no such issue.

from tdesktop.

ilya-fedin avatar ilya-fedin commented on June 10, 2024

Maybe, just maybe, the animation of stickers can be offloaded to OpenGL?

Only if you would write an implementation. No one else has time/motivation for this. But offloading only stickers wouldn't really help as lots of time is likely to be spent in Qt while compositing CPU and GPU driven parts of the UI. Qt copies content of entire window right now when compositing and that's likely why it's worse than your browser. To solve that, one has to rewrite entire tdesktop to Electron, Flutter or QtQuick. I'm doubt anyone would do that, there are already web clients wrapped in Electron which are such modern GPU-driven clients.

from tdesktop.

ilya-fedin avatar ilya-fedin commented on June 10, 2024

it's not completed. You're not helping.

It's completed. If you want a GPU-driven client, switch to web clients. No one will rewrite tdesktop.

from tdesktop.

grepwood avatar grepwood commented on June 10, 2024

Only if you would write an implementation. No one else has time/motivation for this

Could you tell me please which part of the code does this?

Qt copies content of entire window right now when compositing and that's likely why it's worse than your browser

Is this a new behavior in Qt6? The Gentoo system I have still compiles Telegram against Qt5 and there's no such issues there.

To solve that, one has to rewrite entire tdesktop to Electron

Poor RAM.

Flutter

I don't think this is a viable choice, Google just laid off a lot of people working on it.

Thank you for your patient and informative response.

from tdesktop.

ilya-fedin avatar ilya-fedin commented on June 10, 2024

Could you tell me please which part of the code does this?

Well, the problem is entire codebase, as it's written in QtWidgets which is CPU-based. All the widgets in https://github.com/desktop-app/lib_ui and tdesktop itself have to be rewritten from QPainter to OpenGL. The stickers themselves are decoded with https://github.com/Samsung/rlottie and wrapped into QImages with https://github.com/desktop-app/lib_lottie but porting only them to OpenGL is unlikely to provide any improvement as the problem is with compositing the window by Qt rather than decoding the stickers.

Is this a new behavior in Qt6?

Yeah, since Qt 6.4, when they ported QtWidgets compositing from direct OpenGL to RHI.

Poor RAM.

Seem to be ok for most of people... And apparently better than poor CPU.

from tdesktop.

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.