RetroArch icon indicating copy to clipboard operation
RetroArch copied to clipboard

XMB Horizontal browsing not smooth.

Open Tatsuya79 opened this issue 9 years ago • 32 comments

When you have multiple playlists and some of them are huge, XMB will halt on them.

Keeping the right direction pushed down will stop the browsing for a while on my big Mame playlist (5s). To speed it up a bit I have to release the direction, and try to push again several times until it moves. If I don't the browsing will get really slow at proceeding through every item (1s-2s each).

That's an extreme case playlist of 75000+ lines but 10000 lines (complete romset of many systems) is enough to make strong hiccups.

Would it be possible to limit the entries loaded when simply browsing left-right to optimize this?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Tatsuya79 avatar Jan 27 '17 13:01 Tatsuya79

That would just lead to slower browsing as you go down the list, which would be frustrating, as well (perhaps moreso, since you would likely be scooting through the list very quickly to find a specific game). We might be able to do a threaded task to load playlists into memory at launch, though that would eat up quite a bit of RAM to have a dozen or more playlists with thousands to tens of thousands of entries loaded at all times.

hizzlekizzle avatar Jan 27 '17 16:01 hizzlekizzle

That wouldn't be that bad if that's just once: when you go down (or you stop on that playlist) it loads everything left in the playlist.

My main gripe is going through all those playlists and experiencing hangs repetitively going through settings, other system, main menu...

Tatsuya79 avatar Jan 27 '17 17:01 Tatsuya79

is it actually the lists that is causing the delays? or how the icons are read and store when you go through each one.

On Sat, Jan 28, 2017 at 1:02 AM, Tatsuya79 [email protected] wrote:

That wouldn't be that bad if that's just once: when you go down it loads everything left in the playlist.

My main gripe is going through all those playlists and experiencing hangs repetitively going through settings, other system, main menu...

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/libretro/RetroArch/issues/4517#issuecomment-275716592, or mute the thread https://github.com/notifications/unsubscribe-auth/AWPDtgCNU72qXoX-skpIRTczd5nMTKaPks5rWiMPgaJpZM4Lvv0l .

ghost avatar Jan 27 '17 17:01 ghost

That's a good question.

hizzlekizzle avatar Jan 27 '17 17:01 hizzlekizzle

ram usage for retroarch goes up-down each time you view a list, so it is probably loading one into memory and closing it when you move to the next list. after a quick bisecting-it does not seem to cache the thumbnails and does the same thin as you move down-loads image-free image and load next.

On Sat, Jan 28, 2017 at 1:25 AM, hizzlekizzle [email protected] wrote:

That's a good question.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/libretro/RetroArch/issues/4517#issuecomment-275722095, or mute the thread https://github.com/notifications/unsubscribe-auth/AWPDtqMo_KB0FZIe3eQ-1nVBiCt2_P4Cks5rWihxgaJpZM4Lvv0l .

ghost avatar Jan 27 '17 17:01 ghost

I have the same thing happening on PC.

On vita it doesn't actually block the navegation, but rather sort of lags with dynamic backgrounds and thumbnails, like so (click the image for the video):

Vita XMB scrolling

JuanVCS avatar Jan 27 '17 18:01 JuanVCS

I've been trying without assets and thumbnails: it hangs the same.

Tatsuya79 avatar Jan 27 '17 19:01 Tatsuya79

alt idea: make an additional browsing option requiring confirmation before developing a playlist. It could also prevent the "left-right leaves playlist" as you would use "cancel" to go back to that parent horizontal menu. And left right could then be used for 8 by 8 items navigation like in glui.

Tatsuya79 avatar Jan 27 '17 20:01 Tatsuya79

I like the idea of "entering" the playlist too, actually that would allow to have a playlist submenu (rescan, cleanup, change association)

Not sure that's the XMB way but it would make things better imho

andres-asm avatar Jan 27 '17 21:01 andres-asm

I've experienced this on both a Raspberry Pi, and on a x86-64 PC running LibreELEC.

RobLoach avatar Jan 28 '17 03:01 RobLoach

Anyone knows how to add a simple "wait for validate button pressed" before loading a playlist? I'd really like to have that work-around for the moment.

Tatsuya79 avatar Feb 01 '17 11:02 Tatsuya79

@Kivutar Would you be willing to look at this problem?

It's most certainly about file access as opening those playlists in a text editor takes some time too. -Push a button to enter playlist? -Deferred reading (load only when stopping on an item)? -Caching method/incremental reading?

Tatsuya79 avatar Feb 04 '17 14:02 Tatsuya79

I made a video to show how bad it is with many big playlists. My computer is an i5-3570K with Nvidia GTX 770 16GB RAM win7 x64.

https://www.youtube.com/watch?v=IaWEWe53phg

First time going through items by keeping the right direction pushed down. Second time pushing right repeatedly. (it's faster)

Tatsuya79 avatar Feb 24 '17 11:02 Tatsuya79

Came back to look at this issue and got a big speed boost by bypassing xmb_list_deep_copy and xmb_list_switch_new in xmb.c.

https://youtu.be/uvwJ3zD3ZJA

Tatsuya79 avatar Jul 14 '17 11:07 Tatsuya79

Wow, that's some impressive speed improvement! While is is unfortunate that we're loosing the slide animation, the performance gain is most appreciated. Should we have a toggle for it in the settings?

Settings -> User Interface -> Menu -> Horizontal Playlist Slide Animation (default true)

I'd be completely okay with removing the slide animation entirely due for the performance gain. If you post up a branch somewhere, I'd be willing to test it out! Nicely done.

RobLoach avatar Jul 14 '17 11:07 RobLoach

I don't know how to add a setting like that in Retroarch, but it would just need:

Tatsuya79 avatar Jul 14 '17 18:07 Tatsuya79

@Tatsuya79 Do you understand what actually happens (or doesn't happen) when you do that, and what consequences that may have for other people/platforms?

ghost avatar Jul 14 '17 18:07 ghost

Nope, not at all. Just giving this hack for discussion.

I assume it's about the fade in/fade out effect when switching playlist. This is probably going to break the dynamic wallpaper movement or something.

Tatsuya79 avatar Jul 14 '17 18:07 Tatsuya79

PR up at https://github.com/libretro/RetroArch/pull/5172 ... Will need some reviews and investigation on other platforms, as bparker mentioned.

RobLoach avatar Jul 14 '17 19:07 RobLoach

I would be very wary of potential (silent) memory corruption and increased cpu/ram usage especially on slower devices. I mean, why else would a deep copy be there if it weren't needed. At the least I think an initial sanity check run through ASan should be done (make clean && make SANITIZER=address).

ghost avatar Jul 14 '17 19:07 ghost