chatterino2 icon indicating copy to clipboard operation
chatterino2 copied to clipboard

CPU usage scales according to window size

Open orogenic opened this issue 2 years ago • 2 comments

Checklist

  • [X] I'm reporting a problem with Chatterino
  • [X] I've verified that I'm running the most recent nightly build or stable release
  • [X] I've looked for my problem on the wiki
  • [X] I've searched the issues and pull requests for similar looking reports

Describe your issue

I am on Linux. I noticed as chatterino window size increases, CPU usage also increases. I ran a few perf records, and at small window sizes, there are no outlier symbols, but at fullscreen on 1920x1080, two symbols in libQt5Gui.so.5 accounted for more than 53% overhead, and two more outlier symbols in libQt5Gui.so.5 account for an additional more than 12% overhead. I don't know how to quickly make debug symbol build of Qt sorry.

I am wondering, does CPU usage necessarily need to scale with window size? The only similar issue I found is #2242 which mentions high GPU usage according to window size. Maybe due to Linux support or some configuration of my machine, some typically GPU-bound task on Windows happens on the CPU instead on Linux? I am running Xorg NVIDIA. I noticed this issue many months ago. Just thought I'd share.

Screenshots

No response

OS and Chatterino Version

Chatterino 2.3.5 (commit 81a62764c) Linux 5.18.12 NVIDIA Driver 515.57

orogenic avatar Jul 31 '22 15:07 orogenic

Same version/commit as original poster - can confirm this is an issue on my setup as well. Ubuntu 20.04 LTS, Intel UHD 620, Xorg.

Brog33 avatar Aug 08 '22 12:08 Brog33

We make heavy use of the Qt 2d graphics calls, this uses a software rasterizer. As far as I can tell, there's no toggle for us to switch to a hardware accelerated paint method.

References: https://stackoverflow.com/questions/41179514/qt5-on-imx6-how-to-make-sure-the-hardware-acceleration-is-in-use https://doc.qt.io/qt-5/topics-graphics.html#2d-graphics-with-qpainter

pajlada avatar Aug 13 '22 12:08 pajlada

Seeing the same on macOS Monterey 12.6.1 with version 2.4.0 of Chatterino.

colinpeddle avatar Dec 08 '22 12:12 colinpeddle