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

[7.5.0RC6] Channels screen uses 75% CPU #5377

Closed
synctext opened this issue Jun 15, 2020 · 4 comments
Closed

[7.5.0RC6] Channels screen uses 75% CPU #5377

synctext opened this issue Jun 15, 2020 · 4 comments

Comments

@synctext
Copy link
Member

synctext commented Jun 15, 2020

Installed RC6 on Ubuntu 18.04 LTS.
When running Tribler idle for 7 hours it uses 5 hours and 11 minutes of CPU time.
The "discovered" screen seems to use a lot of CPU when refreshing. Discovered 1957 channels and subscribed to 26 channels. 4.4G Jun 15 17:19 metadata.db.

Screenshot from 2020-06-15 17-10-22

Dramatic drop in CPU when moving away. The laptop fan turns off when switching to the "Downloads" screen, reproducible. Note that the CPU usage debug panel graph in Tribler itself is not accurate, it misses the CPU usage. Not a showstopper, but hopefully something we can fix without too much efforts.
Screenshot from 2020-06-15 17-12-30

btw To discuss: this is the sort of manual testing I hope we can Devops / automate in the coming months with a single Dashboard approach.

@ichorid
Copy link
Contributor

ichorid commented Jun 15, 2020

I always knew the way I implemented the "waiting" animation is gonna bite us in the back... It was not that bad until a lot of channels were added.
Replaced the animation with a static picture in #5378. Though if you just move your mouse around the channels list, your CPU will spike because of unnecessary redraws. Still have to optimize that.

@synctext
Copy link
Member Author

OK, thank you for that insight. Removing the spinning animation really degrades the experience that Tribler is working hard for you. Let's think..

@synctext
Copy link
Member Author

self.share_icon.paint(painter, self.get_indicator_rect(option.rect))

btw Is there animated .GIF support that uses less CPU?
Reload-1s-200px

@ichorid
Copy link
Contributor

ichorid commented Jun 16, 2020

AFAIK, that's not trivial, especially with custom-drawn table delegates. There is no light-weight support for icon animations in QT. The corresponding Stack page describes the simplest solution that connects the animation redraw signal to redraw the whole table along with more sophisticated ones. To solve this, I'll have to try 3-5 different methods and it is entirely possible that this can't be solved without going to higher-lever APIs like QML, or going lower with e.g. platform-specific API calls, etc.

For now, I would just disable the animation completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants