danbee / persephone

macOS MPD client written in Swift.
https://persephone.fm
MIT License
215 stars 18 forks source link

CPU Load #19

Closed ghost closed 4 years ago

ghost commented 5 years ago

Hello,

Just for information, the CPU load is 70%, it's huge.

Persephone v0.10.3a, MacOS Mojave.

danbee commented 5 years ago

Hi @Old-Geek, can you give me some more details of your setup? The CPU load can spike when it's loading album art, as it does a lot of image resizing and caching at this point.

ghost commented 5 years ago

Indeed, it is the loading of the covers which poses problem, sorry. It's very very slow

https://i.imgur.com/63PbIFT.png

danbee commented 5 years ago

Are you using especially large cover images? I have managed to improve performance a little in the latest build, not necessarily in terms of CPU usage (encoding JPEG's takes the cycles it takes!) but UI responsiveness is better while it's caching.

ghost commented 5 years ago

I have everything but some images can do 3600x3600px (scan) up to 10MB

danbee commented 5 years ago

3600x3600 is pretty big! The app is resizing that down to 360x360 pixels for the album list. It should only be doing this once though as it is then caching the art, so once the app has loaded all your art it shouldn't have to do that work again.

danbee commented 5 years ago

@Old-Geek I just cut a new release. Would love to know if this improves performance for you: https://github.com/danbee/persephone/releases/tag/v0.11.1-alpha

ghost commented 5 years ago

Thank you for your attention :)

But do not waste your time for me, I also made my own MPD client. I was looking for ideas to improve my application and it was by looking at what was happening that I noticed this problem.

I'll report another problem, all the covers do not load correctly. 48 were not loaded on 411 :o)

https://i.imgur.com/0l6mJvk.jpg

danbee commented 5 years ago

Your client looks pretty neat! It's about time there were more clients for macOS. I hope you don't mind me taking inspiration from your app for improvements to mine.

I have noticed some issues with getting particular cover images for the album view (although not with the same album as you!), but I haven't tracked them all down. My app finds the art by searching for the first track of the album, and some of my albums either have no track numbers, or the first track artist is not the same as the album artist, and thus the search fails.

I also think that sometimes if the track numbers have leading zeros, but haven't fully confirmed that theory. Would you mind taking a look at the tags on any albums that are not showing artwork for anomalies like that?

Screenshot 2019-04-02 at 14 48 01
ghost commented 5 years ago

Inhale everything you like, it's on github for that :)

I have no problem with tag, I'm pretty careful on that side.(I checked again to be sure)

Personally I take the path of the album to get the file cover.jpg but unlike you I use the apache server built into MacOs to get them, no direct access because I also use MPD with my smartphone. It's easier for me. To resize the images I also do it by a PHP script that I declare or not in the preferences, it's less work on smartphones or machine weak.

2

1