Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The on-demand thumbnails downloader makes everything super slow when failing #17242

Open
2 tasks done
bslenul opened this issue Dec 9, 2024 · 5 comments
Open
2 tasks done

Comments

@bslenul
Copy link
Contributor

bslenul commented Dec 9, 2024

Is there an existing issue for this?

  • This is a bug in RetroArch frontend
  • I have searched the existing issues

Description

At the time I'm opening this issue https://thumbnails.libretro.com is down, and I noticed it makes loading games much slower but also some other actions like loading a state or just closing RetroArch.

Here's an example:

thumbnails.mp4
  1. Existing thumbnails don't load.
  2. Hangs for a second or 2 when opening the game.
  3. Doesn't load state until the download failed.
  4. Not shown in the video but RetroArch hangs for a few seconds on close if I go to my "History" tab then close RA (I'm assuming it's waiting for the download to fail).

edit: Here for 4.:

thumbnails_close.mp4

I use the log console to show that it takes waaaaaaay longer to close than usual (it should close almost instantly) but you can also use the task manager or whatever to see that retroarch.exe stays open for a few seconds after closing.

Note that it seems to happen ONLY if you have a game with missing thumbnail in your "History" tab.

Expected behavior

No response

Steps to reproduce the bug

Might be hard to test if the server goes back ON, I guess you could block the address in firewall or something? Idk. But anyway:

  1. Enable Settings > Playlists > On-Demand Thumbnail Downloads.
  2. Restart RetroArch.
  3. Go to "History" tab with at least one game with missing thumbnails.
  4. Launch a game (and optionally load a state) or just close RetroArch.

Version/Commit

1.19.1 29bee5c

Bisect Results

No response

Check in the nightly version

Yes, this is reproduced in the nightly build

Platform & operating system

Windows 10

Affected Cores

No response

Environment information

No response

Relevant log output

[ERROR] [Thumbnail]: Download "H:\Emulators\RetroArch\thumbnails\Sony - PlayStation 2\Named_Snaps\Gran Turismo 4 (USA).png" failed: Internal error.

@bslenul
Copy link
Contributor Author

bslenul commented Dec 9, 2024

Haven't tested myself but apparently it also breaks achievements and overlays: https://www.reddit.com/r/RetroArch/comments/1h9za1w/the_onscreen_controls_on_ios_have_been/ 😓

edit:
Confirmed, tested with a N64 game, took ~20sec for achievements and overlay to show up...:

thumbnails2.mp4

@SyddG
Copy link

SyddG commented Dec 11, 2024

+1 on this. Currently experiencing it. Not able to access http://thumbnails.libretro.com.

@LeiFangBaby
Copy link

I have the same issue, and since it cannot access the site, manually downloading thumbnails/boxarts/titles doesn't work either, despite showing progress in chunks of 33% then 66% for each and taking a lot of time per-game.

I resorted to opening desktop UI with F5 and manually dragging the files for each, but it's extremely cumbersome and takes too long, as it doesn't support .jpg for boxarts and .png ones are only in those huge libretro console packs.

@warmenhoven
Copy link
Contributor

warmenhoven commented Dec 12, 2024

Since all these things are tasks and there's only one thread handling tasks, any blocking networking operation will stall the entire thread. The on demand thumbnail downloader in particular is egregious about this, queuing multiple http requests. This blocks all networking, overlays, loading and saving states, etc.

I have some ideas for how to fix it, and I've started experimenting with a couple. Adding another thread is a potential option but without knowledge of what type of request it is, multiple blocking networking operations can still clog all the threads. Knowing what kind of task it is, would be a breaking api change to libretro, so not really feasible.

@warmenhoven
Copy link
Contributor

Incidentally this exact problem happens on iOS all the time, when it's in airplane mode. It's something I've had in the back of my mind for a long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants