Author Topic: Selection wheels lag when using themes with videos  (Read 10057 times)

tjwoosta

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Selection wheels lag when using themes with videos
« on: December 16, 2016, 08:35:13 PM »
I cant help but notice that the selection wheels do not react smoothly when using themes that play videos.

I don't know how to explain, its like retrofe waits for the video to load in and start playing before it lets you swap to the next item in the list.

If I swap fast enough everything works smoothly, and if I slow down enough everything works smoothly, but if I swap at just the right speed where I land on something for long enough that the video begins loading in it wont let be swap away until the video starts playing.

With my installation on two ssd's in raid0 its not that slow, but noticeable enough to be an annoyance.

Is there anything that can be done about this?

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1534
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Selection wheels lag when using themes with videos
« Reply #1 on: December 16, 2016, 08:55:06 PM »
Are you certain that when you turn off video this problem does not exist? In other words: is it the video or the whole set of art that needs to be loaded that is the problem?

Sent from my SM-G920F using Tapatalk


JonahUK

  • Guest
Re: Selection wheels lag when using themes with videos
« Reply #2 on: December 16, 2016, 10:26:03 PM »
Never had this issue in any of the themes (pre-built and also my own "wip" shown here: http://retrofe.nl/SMF/index.php?topic=6.msg11#msg11)?
I can change to any item regardless if the video is playing or not?

Have you checked the animation settings for your theme?
« Last Edit: December 16, 2016, 10:46:46 PM by JonahUK »

tjwoosta

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Selection wheels lag when using themes with videos
« Reply #3 on: December 17, 2016, 01:46:10 AM »
Are you certain that when you turn off video this problem does not exist? In other words: is it the video or the whole set of art that needs to be loaded that is the problem?

Sent from my SM-G920F using Tapatalk

Hmm, you are correct. I assumed it was related to the video, but I deleted the video parts of the layout.xml and the problem persists.

Ive only tried two themes so far, aeon nox and flatio and it happens on both of them. Im using the pre-configured build from emumovies ftp so there is tons of artwork.

Its not like a huge delay or anything, just enough that its noticeably not smooth compared to hyperspin for example which never lags up.

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1534
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Selection wheels lag when using themes with videos
« Reply #4 on: December 17, 2016, 08:08:24 AM »
Hyperspin can only load a few pieces of art per game, so that's understandable. I would not have expected this problem to show up while using SSDs to be honest, but you should consider taking a look at the size of your artwork. At one point in time I was loading 20-30 MB of data per game (not counting the video, which is loaded a small piece at a time), which on a normal HD can take quite a bit of time. I'm currently running my setup from a portable HD, and the slowdown is very noticeable.

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1534
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Selection wheels lag when using themes with videos
« Reply #5 on: December 17, 2016, 01:40:25 PM »
I had a closer look; I think I may have found a way to speed things up. I've made some changes to the code that seem to work for me, but I'll do a few more tests before releasing it to the public.
Basically what it currently does is load all art when a new menu item is selected, but the wheel art doesn't need to be reloaded when a wheel was just spinning (new items are automatically added already). With normal wheel art that shouldn't cause much delay, but with box art, like Aeon Nox uses, that can be quite a lot of MBs to read from the HDD/SDD. I've removed the reloading of menu art, and that does appear to speed things up a bit. As said: I'll do some more testing. :)
« Last Edit: December 17, 2016, 01:49:44 PM by Pieter Hulshoff »

Tom Acunzo

  • Newbie
  • *
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: Selection wheels lag when using themes with videos
« Reply #6 on: December 28, 2016, 08:04:23 PM »
This may not be related. I don't know if this is a side effect of replacing an old retrefe build layout with a newer retrofe executable but the Carousel 16x9 layout's wheel will load all the old artwork if you enter "Genesis" and then exit back to main. Zero Tolerance will still be showing as choices inside the main menu. It's as though a wipe of the last artwork was skipped.

Note: this theme wasn't updated to group it's media inside images, sounds, fonts, videos folders as in the later retreofe builds. If there are newer updates to these themes I'd like to know where I can download them.

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1534
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Selection wheels lag when using themes with videos
« Reply #7 on: December 28, 2016, 08:23:04 PM »
They need to be updated still. Pre 0.7.2 themes will not work properly on 0.7.2+ executables. 0.7.2 marked a serious fix in theming and animations.

Sent from my SM-G920F using Tapatalk


dlol

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Selection wheels lag when using themes with videos
« Reply #8 on: April 26, 2017, 11:45:46 AM »
Can confirm the lag OP is talking about. It's noticeable even with video playing disabled in settings, so I don't think it's a video or HD issue. I tried to replicate the lag with a fresh 0.8 build on my SSD and it's definitely there. Tried on a keyboard and a generic USB controller, too. It's also noticeable in all themes I tested (Nox, Glados and Default, though Default seems just a tiny bit more responsive)  It's not like RetroFE is ignoring my input, it's like, when you press a direction at the right time, RetroFE doesn't change  selections immediately, he takes around 0.6s to do so. Here's a more detailed step-by-step so you guys can try to feel it.

1 - Open a fresh, clean RetroFE build. I tried it with the 0.8 full build avaliable in the Downloads section.
2 - Aeon Nox should start.After the intro, press 'right' or 'left'  one time. RetroFE should take around 0.2-0.3 seconds to answer, which is OK.
3 - Right before the transition between systems kicks in (the background fades out and in), press another direction. You should notice an increase in input response to around 0.6 seconds, like RetroFE is waiting for something before processing your request.

I tried to explain it with the best of my ability, but I can try to record a video with my phone  if it's necessary.


PS: This is my first post, so I'd like to thank Hulshoff and the RetroFE community for making and maintaining one of the best frontends there is! Very customizable and easy to work with. Keep going! :D

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1534
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Selection wheels lag when using themes with videos
« Reply #9 on: April 26, 2017, 12:16:13 PM »
Can confirm the lag OP is talking about. It's noticeable even with video playing disabled in settings, so I don't think it's a video or HD issue. I tried to replicate the lag with a fresh 0.8 build on my SSD and it's definitely there. Tried on a keyboard and a generic USB controller, too. It's also noticeable in all themes I tested (Nox, Glados and Default, though Default seems just a tiny bit more responsive)  It's not like RetroFE is ignoring my input, it's like, when you press a direction at the right time, RetroFE doesn't change  selections immediately, he takes around 0.6s to do so. Here's a more detailed step-by-step so you guys can try to feel it.

1 - Open a fresh, clean RetroFE build. I tried it with the 0.8 full build avaliable in the Downloads section.
2 - Aeon Nox should start.After the intro, press 'right' or 'left'  one time. RetroFE should take around 0.2-0.3 seconds to answer, which is OK.
3 - Right before the transition between systems kicks in (the background fades out and in), press another direction. You should notice an increase in input response to around 0.6 seconds, like RetroFE is waiting for something before processing your request.

I tried to explain it with the best of my ability, but I can try to record a video with my phone  if it's necessary.


PS: This is my first post, so I'd like to thank Hulshoff and the RetroFE community for making and maintaining one of the best frontends there is! Very customizable and easy to work with. Keep going! :D

Welcome dlol. :)

As explained above and in other posts on this forum: this delay is caused by the loading of art: the larger the art you're reading, and the slower your HD, the more time is required for this. Some of the themes, like Aeon Nox, load quite a bit of art from one selection to the next. Loading that art takes time, during which RetroFE simply waits. If you scroll fast enough, no such delay will be seen; it's only seen if the next game isn't selected before the fade-out animation is complete.

There's really not that much that I can do about it. I cannot avoid loading the art, pre-loading is difficult, and the lag completely depends on how big the art is (in MB) and how fast the HD is. As such, some themes will be hit harder by this problem than others, and on an SDD this problem is much less visible than with an (old) HDD.

What can be done is introduce an additional wait time before the art loads. This will always increase the animation time, but as long as the previous/next button is pressed before that wait time is complete, the art will not be loaded. This can simply be added in the layout.xml file.
« Last Edit: April 26, 2017, 12:18:04 PM by Pieter Hulshoff »

ryuuji

  • Full Member
  • ***
  • Posts: 166
  • Karma: +1/-0
    • View Profile
Re: Selection wheels lag when using themes with videos
« Reply #10 on: April 26, 2017, 01:55:42 PM »
I assume the the pc specs are not a problem ... for me, personally, when it comes to artwork or reloadable text that the onMenuScroll+onHighlightEnter combination works better/smoother than onHighlightExit+onHighlightEnter
Dunno if this helps anyone but it is how I ve experienced it.

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1534
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Selection wheels lag when using themes with videos
« Reply #11 on: April 26, 2017, 02:04:36 PM »
I assume the the pc specs are not a problem ... for me, personally, when it comes to artwork or reloadable text that the onMenuScroll+onHighlightEnter combination works better/smoother than onHighlightExit+onHighlightEnter
Dunno if this helps anyone but it is how I ve experienced it.

What this does is already fade-out the art during the scroll. This will reduce the total wait time, since normally you need to wait scroll time + fade out time + art load time + fade in time, while with this combination you only wait max (scroll time, fade out time) + art load time + fade in time. It will not actually reduce the "lag" though; it will leave less time to press the next button before the art is loaded. It might feel less laggy though. :)

ryuuji

  • Full Member
  • ***
  • Posts: 166
  • Karma: +1/-0
    • View Profile
Re: Selection wheels lag when using themes with videos
« Reply #12 on: April 26, 2017, 02:08:39 PM »
I keep onHighlightExit/Enter on the videos but I use onMenuScroll/onHighlightEnter on the rest :). I find it smoother and/or less choppy :P

dlol

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Selection wheels lag when using themes with videos
« Reply #13 on: April 26, 2017, 02:37:34 PM »

As explained above and in other posts on this forum: this delay is caused by the loading of art: the larger the art you're reading, and the slower your HD, the more time is required for this. Some of the themes, like Aeon Nox, load quite a bit of art from one selection to the next. Loading that art takes time, during which RetroFE simply waits. If you scroll fast enough, no such delay will be seen; it's only seen if the next game isn't selected before the fade-out animation is complete.

Oh, I see! That makes sense. The previous frontend I used was mGalaxy, and the default theme uses just  an image or a video (never both) on screen, and because of that, it was pretty fast to load. I think I got used to it, and the lack of responsiveness bothers me more than it should.

I keep onHighlightExit/Enter on the videos but I use onMenuScroll/onHighlightEnter on the rest :). I find it smoother and/or less choppy :P

I'll try your solution and see if it helps! Thanks!

dlol

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Selection wheels lag when using themes with videos
« Reply #14 on: April 26, 2017, 02:52:32 PM »
What can be done is introduce an additional wait time before the art loads. This will always increase the animation time, but as long as the previous/next button is pressed before that wait time is complete, the art will not be loaded. This can simply be added in the layout.xml file.

And how should I go about doing this? I'm still not used to editing the layout.xml files   :P