milohr / babe-qt

This version is unmantained. The new version is now named VVAVE
https://phabricator.kde.org/source/vvave/
Other
139 stars 9 forks source link

When launched it uses ~60% of one cpu core #13

Closed mmetak closed 7 years ago

mmetak commented 7 years ago

Hey, I packaged it for archlinux in aur, but when launched it uses ~60% of one cpu core without even doing anything. A bug maybe? (qt5.8, latest kf5)

milohr commented 7 years ago

i'm not sure why that happens. at startup it does several things: it loads all the views content from the db and sets the artwork it also loads some watcher (QFileSystemWatcher)... how to debug this? how do you check how much % of cpus is using?

milohr commented 7 years ago

i just checked with kde system monitor and it appears to be from 17% to 24% maximum of cpu. so this might be releated to QtMultimedia/QMediaPlayer

mmetak commented 7 years ago

With htop. That's just cold launch with no changes whatsoever.

milohr commented 7 years ago

going to run some checks but i strongly believe this is something outside my code, cause when using https://github.com/andreisergiu98/music-player-qt5 as a based in the very beginning of my experiments with qt5, that app was -and still -using the same amount of cpu and that player doesn't do much.

J4nsen commented 7 years ago

Just used the Arch AUR and I get 85% CPU usage on one core.

milohr commented 7 years ago

tonight i will run some testes to find out why is it using so much cpu.

milohr commented 7 years ago

i fixed it. it now uses around from 2% to 5%, although when on the albums or artists view the cpu usage increases up to 17 % - 20% I'm not sure why that is right now. For now i'm closing this issue, if you find any more abnormal behaviors please don't doubt in report again. thank you :) if you would test my recent changes would be great!

mmetak commented 7 years ago

Yes, you're right, when on the albums or artists view the cpu increases.

milohr commented 7 years ago

my first though was that the paintEvent method override i made in the Album class was causing it but i removed it and still the cpu went that high. maybe is the way i'm creating the object for each album or it might be the image size storage as the qpixmap... i'm not sure anyway right now, i will continue to find a solution. can you confirm please that the cpu usage decreased in the other views besides the two already mentioned?

mmetak commented 7 years ago

Yes, I can confirm.

milohr commented 7 years ago

@mmetak just so you know i've updated master with a fix for the album/artists view high cpu usage. if you could pls confirm when you have the time that the fixes worked for you too woudl be great.

mmetak commented 7 years ago

Looks like it's fixed now. ;-)