Jump to content

App Performance Discussion


chessdragon136

Recommended Posts

chessdragon136

Hi All,

 

Following recent discussions I have spend the morning looking at the performance of the HD app on my H series tv after reports that the interface is sluggish. 

It is - It's not dire but there are definitely improvements to be had. 

 

Backdrops Resolved

My first simple solution, on the Series / Movies pages, I suggest we disable the background loading dependant on what option is highlighted currently. On mine, when i have a full screen of shows, I can barely see the backdrop anyway and it just seems pointless to load something you can barely see. 

After I'd done this I had some minor improvements on my tv.

I may also suggest dropping the backdrop res to 720p and stretching it. I doubt most people will notice.

As such, the background image for these views will be the image from the previous page you were on.

The exception for this is collections, which generally dont have many items in them but share the same view - These will change

 

Series / Movies Displayed Not implemented

The next possible option is to display less items in one go on this view, which for me is set at 9*3. Personally I'd prefer not to do this, and its  a lot of mess to change it, and even more to make it configurable to user preference. the 27 looks good.

 

Main Menu opening / backdrop fade In Progress @@cmcg

On mine, these fades become a jerky 2 or 3 stage process. @@cmcg are the fades all jquery? if so, I think the jquery samsung implementation is poor and perhaps we should make it a bit less flashy to support better interaction. This is also true for the spinny disc animation.

 

Image Caching In Progress @@chessdragon136

Just to say that I have a H series TV and tomorrow I plan to load the new app fresh and try it for myself. 

If its not as quick as i hope I'll look to see what changes can be made. Caching images is almost impossible but maybe we can render the images down to 720p and upscale on the tv? I don't know. 

Slightly embarrassing but after stating that image caching is nearly impossible I now have an implementation of image caching in 3 hours. As with all caching, the first image load now takes longer (and sadly locks the GUI at the moment for approx 1 second) all subsequent reloads are done from cache and not from HTTP calls, making it load significantly faster & no more flashing images on navigation (YAY) 

 

I have concerns over how large the cache may get so will probably have to delete it on a weekly basis / algorithm that checks entry count and removes any pops anything over 200 images, so you will have to accept that once a week it may be a touch slow once per new image. Also, the background images are not cached given their size. @@cmcg the caching uses base64 datauri's matched aganst the url (sans the server details) within a json object.

 

Don't expect to see this in the next few weeks, I want to be more confident before it gets pushed out anywhere. And when it is expect issues.

 

Page Redesigns Scrapped (May remove episode top right image as it looks wrong on the page)

As part of reducing load, I think some pages would be better off becoming less cluttered with images, especially the tv episodes page:

 

Tag @@Ultroman for dragging me into this.

 

Please let me know. 

Edited by chessdragon136
Link to comment
Share on other sites

FrostByte

Backdrops 

My first simple solution, on the Series / Movies pages, I suggest we disable the background loading dependant on what option is highlighted currently. On mine, when i have a full screen of shows, I can barely see the backdrop anyway and it just seems pointless to load something you can barely see.

 

I may also suggest dropping the backdrop res to 720p and stretching it. I doubt most people will notice.

 

Agree on first, unless you have a very small library you really can't see much of what is back there.  Maybe a very plain background that stays the same and loads really quick.  Just for scrolling a full list of movies and tv is what you're talking about I assume.  For Collections though it would be nice if it stayed because most collections are rather small and you really don't need to scroll  for collections often. 

 

On being 720 cmcg tried it and he could barely tell the difference from the old 540 version.  I personally would like to see the app stay at 1080 if possible and would welcome tweaks other places

Edited by FrostByte
Link to comment
Share on other sites

chessdragon136

Ok good point - If its a collection it now updates the background :) 

As for 720p if we limit how often we change backdrop then it may work - I may look at other pages so it doesn't change on a per season / episode basis 

Link to comment
Share on other sites

FrostByte

 

Main Menu opening / backdrop fade

On mine, these fades become a jerky 2 or 3 stage process. @@cmcg are the fades all jquery? if so, I think the jquery samsung implementation is poor and perhaps we should make it a bit less flashy to support better interaction. This is also true for the spinny disc animation.

 

 

 

It loads the discs on mine fairly quickly if the disc image is already downloaded on the server.  On some movies I don't have them already and the server downloads them and then displays them which can take a second or two.  Otherwise I think it runs smoothly.  Maybe turn it off by default if it's causing people issues.

Link to comment
Share on other sites

FrostByte

Image Caching

Slightly embarrassing but after stating that image caching is nearly impossible I now have an implementation of image caching in 3 hours. As with all caching, the first image load now takes longer (and sadly locks the GUI at the moment for approx 1 second) all subsequent reloads are done from cache and not from HTTP calls, making it load significantly faster & no more flashing images on navigation (YAY) 

 

I have concerns over how large the cache may get so will probably have to delete it on a weekly basis / algorithm that checks entry count and removes any pops anything over 200 images, so you will have to accept that once a week it may be a touch slow once per new image. Also, the background images are not cached given their size. @@cmcg the caching uses base64 datauri's matched aganst the url (sans the server details) within a json object.

 

 

 

Instead of deleting everything, can you delete based on age?  For instance anything that was created over 30 days ago, or even better yet last accessed since 30+ days ago.  That might be a little hard, but you wouldn't have to delete everything and start over

Link to comment
Share on other sites

chessdragon136

Age no, I don't want to record that info, but I plan to keep the last 200 or so images in the cache, and then the first one that was loaded after 200 will be pushed out. 

To be honest, anything more complicated will take more computational time to work out which to keep and which not than it would to just recache the image.

 

The 200 figure is experimental. I do not know how many i can cache before i get poor performance / issues. I'd like 500 ideally. 

  • Like 1
Link to comment
Share on other sites

shorty1483

Don't know if I'm the only one but for me the Movie poster and Disc are tied to a nice detail page presentation for movies. But generally I also proposed in the past to set the starting point of the Plot higher. We have so much space in the middle of the screen to put it higher and prevent auto scrolling. Only thing would be to colour the menues like Actors or chapters to get it readable in front of the plot.

 

But I agree on the Episode part. Perhaps dropping poster and try stretching the episode image as background could be an approach worth a try for the Episode Detail Screen? I know the resolution of the episode images is not as big, perhaps this could be eliminated by unsharpen the BG a bit?

Edited by shorty1483
Link to comment
Share on other sites

FrostByte

Ok good point - If its a collection it now updates the background :)

 

 

Sorry, I think I was referring to inside a particular collection where there is usually only a few movies, the entire list of collections can be very long

Link to comment
Share on other sites

CBers

Is the performance issue purely on H series TV's?

 

My F8000 has the odd slowness, but nothing major.

 

Although when it does happen, I do wonder if there is a bug in the Smart Hub itself, as the only way I get round it, is to power cycle the TV.

 

Perhaps that's a different discussion for a different day.

Link to comment
Share on other sites

FrostByte

I'm running a H series SmartHub and I don't think it's all that bad. 

 

I agree that maybe you can turn off changing the background scrolling all movies because you really can't see it much anyway.  That would probably help a lot and be a good starting point.

 

I would take it in baby steps, no need to remove all our eye candy right away because a minority are having issues. 

Link to comment
Share on other sites

chessdragon136

CBers: No - this is general performance enhancing for the HD app - It was only noted by a member here that H series were bad. The problem is is I do not know what people clasify as good or bad, but there is room for improvement regardless 

 

Frostbyte: Well its enabled for both when in the Collections view, and for movies within a collection. I can't think of any quick means to do one and not the other. 

 

Shorty: Ok i may just remove that episode image top right as personally it is really odd!! The rest can stay.

Link to comment
Share on other sites

Agreed. H-Series does seem like a retrograde step in performance compared to F. Oh well.

 

Now, @@chessdragon136 , I agree with not changing the background on the Movies/Series page. In fact I've made that change today as well.

 

However, everything else should wait while we deal with the underlying problem here. That is that all the animations are being done with jquery and not CCS3. By moving to CSS3 transitions we fix a lot of this straight away because JavaScript is single threaded so as soon as you try to do two things at once you're in trouble. Like if you're moving about when the background is changing. Also For instance, the menu and the page are two separate items. when you open the menu two separate jquery animations run at the same time to move both items to the left. Changing that to a CSS transition makes it much better. The same is true in lots of other places and the transition is smoother than before, including the background crossfade.

 

Take a look at 2.1.0a I just posted on the beta site. It's not finished but maybe you H-Series owner can give me some feedback.

  • Like 2
Link to comment
Share on other sites

FrostByte

Take a look at 2.1.0a I just posted on the beta site. It's not finished but maybe you H-Series owner can give me some feedback.

 

I'll load this now on my H series hub

Link to comment
Share on other sites

chessdragon136

@cmcg: Great :) - I had no plans of removing anything in relation to that, only to highlight that jQuery is an issue and we do need to move away from it for these things. I didn't know you were already looking at that, and between this and the image caching to reduce http when the image is already loaded once there are significant gains to be had. Currently I'm able to cache 400 images ok with only minor slowdowns on start and app exit (read & write to cache file). The only other aspect im looking at in relation to performance is ensuring all timeouts are correctly closed down.

 

I'll get it loaded as soon as i can. 

Edited by chessdragon136
Link to comment
Share on other sites

FrostByte

Well...that new background isn't my cup of tea :) but it seems to load the images a lot faster when scrolling movies.  It still needs to reload posters obviously because it's not caching, but I don't think it could get much faster without caching

Edited by FrostByte
Link to comment
Share on other sites

FrostByte

Oh, and I like the new way you're highlighting posters.  The white box when using the CA plugin wasn't the best

Link to comment
Share on other sites

FrostByte

That other image must be something from my library.  It looks like when scrolling it keeps the background of the last movie/show you were on until you click another.  It does seem faster though since it's not constantly changing

Link to comment
Share on other sites

chessdragon136

Just had a play ->

  • The backdrop fade is lovely!
  • As is the selector, but can you make it a touch bigger for the series page? I lost track of it once or twice.
  • The main menu is slow (1.5seconds ish) to open fully - Assuming that is yet to be looked at. 

Thanks!

Link to comment
Share on other sites

There is a delay in the backdrop transition on this version, better in the next.

I'll increase the zoom for the small view in the series page.

The main menu open/close is one of the main changes here. It is done and works much better on my F-Series.

  • Like 1
Link to comment
Share on other sites

chessdragon136

Right just done a complete flush and tv reset through the service menu - It turns out that although I had updated to your version it still had some of my code cached as it was trying to image cache (and fail) in the background.

 

Menu loading is much nicer in this build. 

 

Let me know if i can help out

Link to comment
Share on other sites

Thanks chess. Better we not work on the same stuff too much or it will be a nightmare to merge. I'll try to merge your feature changes during this week.

Link to comment
Share on other sites

  • 2 weeks later...
FrostByte

For Collections would it make more sense to have the backdrop for the Collection displayed instead of the backdrop for the individual movies within the Collection?  For instance the Harry Potter collection has 8 movies and when you move the focus between the individual movies the background changes for all 8 movies.  If you displayed the collection background instead while inside the collection itself then you wouldn't need to keep changing it and it would speed things up.  Then when you click inside a movie you would see the movies background.

 

This would also be consistent with the webclient which shows the collection backdrop until you click on one of the movies.

  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...
anderbytes

Is someone also experiencing slow performance in new 2.1.2 version?

 

How can I audit the cause of this?

Link to comment
Share on other sites

  • 1 month later...
SamES

FYI, I suspect that ImageCaching is not working in E-series.  I've noticed in the emulator (and confirmed on the TV) that window.URL is undefined and createObjectURL obviously fails.  I guess it's not supported.  I suspect there is no work-around where this function is not available.  

 

If only it was still possible to get an SEK-2000....

Link to comment
Share on other sites

FrostByte

If only it was still possible to get an SEK-2000....

 

The prices have skyrocketed now that Samsung isn't making them any more.  I think I found one on Amazon for about 2X the $$ I paid for mine straight from Samsung.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...