Roland0 wrote: 
> When I open a list view with covers (e.g. new music, albums, ...), I can
> see each image being loaded sequentially.

Squeezer will do at most two image fetches in parallel, to:

a) Avoid overloading the server.

b) Avoid overloading lower-end phones. Fetching more images means you
have to have more images in memory on the device at once, and if your
album artwork is large this can easily exhaust lower-end Android devices
of memory. I'm aware that image requests can ask the server to resize
the image, but this can slow image fetches down even more. In my tests
it was faster to have Squeezer ask the server for a 1024x1024 album
artwork image and scale it down on the phone than it was to ask my
Squeezeserver (running on a QNAP 409) to scale the image first.  And
trying to send too many of these resize-the-image requests to the server
resulted in my server consuming too much CPU and never recovering (to
the point where I had to restart the NAS).

> When scrolling, no image gets loaded (black squares shown, even when
> text has been loaded) until I stop, then again one image is loaded after
> the other.

Squeezer works very hard to keep the UI moving as smoothly as possible.
One of the ways it does that is to pause access to the cache during
scrolling, to ensure that no disk access can happen on the phone/tablet
during that period, and that no manipulation of large images can occur.

Without this, disk access + memory garbage collection can easily take
more than 16ms, which is the point at which the UI will drop below 60
frames per second, and start to stutter.

Do you use the Twitter Android app?  If so you should observe very
similar behaviour from it if you scroll rapidly through the Twitter
stream -- no images appear during scrolling (unless they've already been
loaded into memory) and then images are fetched and displayed when the
scrolling stops.

> They are also only are loaded when scrolling to a position and stopping
> the swipe (i.e. only when visible on screen). When all images have been
> loaded, I can scroll normally with all images shown. As soon as I exit
> the list and enter it again, the loaded images are gone and slowly are
> re-populated as described above.
> fwiw, I use a Galaxy S2, performance is fine.

What you should observe (e.g., "Home Screen -> Albums (wait for images
to load) (press back) -> Albums") is that the images appear faster the
second time you enter the Albums screen. This is because they've been
cached to disk, and are now being read locally instead of being fetched
from the server.

You should also observe that images appear almost instantaneously if you
rotate the device (as the memory cache is retained during the
rotation).

> To add to pippin's explanation: There are basically two GUI modes for a
> plugin (I'll call them web and jive, not sure what the official names
> are)
> - Web: only shown in LMS web gui, usually what you see if you go to
> settings/plugins/[plugin name]/settings. Uses server-based HTML
> templating engine (included in LMS), server sends the complete HTML
> page. Mainly used to configure plugins. AFAIK not available in 3rd party
> remotes / GUIs
> - Jive: available on Touch, Controller, LMS Web UI, some 3rd party
> remotes / GUIs. Based on GUI definition sent by server (e.g. textfields,
> buttons, ....), client needs to parse definition, render UI, control
> user interaction, and send result data back to server. Usually used to
> extend regular menus (Extras, My Music), or context menus.
> 
> You could e.g. try the SmartMix plugin, which uses all all of the above
> techniques.

Ah, that's very helpful.  I'll investigate this once version 1.1 is out
of beta and released.  Thanks.


------------------------------------------------------------------------
nikclayton's Profile: http://forums.slimdevices.com/member.php?userid=63164
View this thread: http://forums.slimdevices.com/showthread.php?t=101898

_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to