jez500 / chorus

A Web UI for XBMC, focused on user experience and music. Get the latest version here: https://github.com/xbmc/chorus2
357 stars 54 forks source link

Sluggish on large music collections #1

Open kopf opened 10 years ago

kopf commented 10 years ago

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:

jez500 commented 10 years ago

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.

kopf commented 10 years ago

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).

jez500 commented 10 years ago

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 :)

kopf commented 10 years ago

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?

jez500 commented 10 years ago

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.