chorus icon indicating copy to clipboard operation
chorus copied to clipboard

Sluggish on large music collections

Open kopf opened this issue 11 years ago • 5 comments

As you note in the README, performance is a problem with large music libraries.

I have a few ideas on how this could be improved, but as I have limited frontend dev knowledge, these might be wildly off. In any event, this might be a good place to get a discussion going, ideas pooled, and then split into individual issues to be worked on and fixed.

Some things I thought of:

  • Scrolling performance is one of the main sore points. This could be improved by only dynamically loading artist art (for example) once the user has stopped scrolling.
  • Paginate the artists and albums lists, loading only the first N artists to begin with and then using infinite scrolling to load further artists when necessary.
  • Add an option to allow users to optionally cache responses from XBMC's JSON-RPC API, setting an expiry limit and also providing a button to manually invalidate the cache.

kopf avatar Jan 21 '14 15:01 kopf

Hi kopf

I think the main cause of the sluggishness comes from the artists list (which basically renders every artist to the screen). I do have lazy loading on the images in this section but I think it isn't enough.

I have looked at other solutions and it looks like the fix is to add only a placeholder then as you scroll, load in the items that are visible (or almost visible) into their respective placeholders. I'll look into this more for you.

I don't really want to paginate the artists as I find it really convenient to be able to scroll straight to Z with no extra clicks.

And almost all requests are cached, on load it caches all artists, albums and songs.

jez500 avatar Jan 22 '14 00:01 jez500

I have looked at other solutions and it looks like the fix is to add only a placeholder then as you scroll, load in the > items that are visible (or almost visible) into their respective placeholders. I'll look into this more for you.

Great! That's just what I meant with using infinite scrolling.

Thanks for putting your time into this interface. It's an absolutely beautiful UI, and exactly what XBMC needs - a pleasant way to control remotely from another PC (as opposed to phone or tablet, for which there are plenty of great solutions).

kopf avatar Jan 22 '14 01:01 kopf

Cool, I'll post any progress updates on that on here, currently knees deep in implementing browser streaming.

Glad you are liking it! Yeah I use this thing every day at work so as soon as a UI aspect starts to annoy me, I try and tweak it for the better. Kinda helps that web UX is my day job :)

jez500 avatar Jan 22 '14 10:01 jez500

Having upgraded to 0.2.6, I've noticed Chorus to be significantly snappier when scrolling through my artists list. Good work!

It is, however, still pretty sluggish. Are there further optimizations that can be made, or have you already implemented everything you were talking about?

kopf avatar Mar 09 '14 10:03 kopf

Great to hear! There will always be refinements that improve performance as we go, lots of them just come from noticing silly bugs I added in the past. So not finished yet but not really actively working on it at the moment either.

jez500 avatar Mar 10 '14 12:03 jez500