ruffle-rs / ruffle

A Flash Player emulator written in Rust
https://ruffle.rs
Other
15.36k stars 793 forks source link

Abnormally long load times #5056

Open Hexstream opened 3 years ago

Hexstream commented 3 years ago

Thank you so much for Ruffle! Most of the flash content in the Pokéhidden Archive (NSFW) already works pretty well.

Describe the bug

Unfortunately, the single most important piece of content on the site, Banned from Equestria (Daily) 1.5 (NSFW), takes a few minutes to load. This is clearly not normal, as the official Flash Player projector loads all Flash content on the site instantly. You can download the SWF file here.

There are other animations and games affected by noticeable (and abnormal) load times, but this is by far the worst case.

Here is another NSFW animation that takes a few seconds to load (white rectangle), this should load instantly. Here is the SWF file.

Expected behavior

All the flash content in the Pokéhidden Archive should load instantly, exactly as it does in the official Flash Player projector.

Is the problem with the Ruffle desktop app, extension, or self-hosted version?

I am using Ruffle self-hosted nightly 2021-06-25.

What platform are you using?

Desktop: Linux dynamorph 4.19.0-17-amd64 #1 SMP Debian 4.19.194-2 (2021-06-21) x86_64 GNU/Linux Google Chrome 91.0.4472.114 (Official Build) (64-bit)

Mobile: Android 11; Pixel 3 XL Build/RQ3A.210705.001 Chrome 92.0.4515.131

Bale001 commented 3 years ago

4925 will definitely help out with this

Hexstream commented 3 years ago

Amazing! This sounds really promising! I can't wait for this to land!

Thank you for the pointer.

Hexstream commented 1 year ago

Thank you very much @kmeisthax, I can confirm that the preloader for Banned from Equestria now loads instantly as of Ruffle 2022-09-17, thanks to the work on #4925 and #7858.

Unfortunately, the user is now forced to wait 45 seconds (on my computer, Intel® Core™ i3-6100 CPU @ 3.70GHz × 4) for the game to load instead of the previous 32 seconds, at least with a much better visual user experience (seeing the actual in-game preloader instead of a white rectangle), but again note that the entire game is supposed to load instantly (at least from a user's perspective), as seen with the official Flash Player.

I think the hard part of the work is already done, I think now the issue is that Ruffle loads too much of the game before letting the user play? Just loading the first few frames should be enough to let the user start playing...

SN902 commented 1 year ago

On old matepad M5 lite '8 (2019) tablet it took 48 sec, and only now this game finally playable here, previously every time game just crashed due to not enough memory (installed 3GB RAM and only 1270MB left to use, this swf eat all memory, tablet starts to lagging, browser hang) Banned from Equestria.webm

Hexstream commented 1 year ago

Interestingly, the game now no longer loads on my Google Pixel 3XL, as it gets stuck late in the loading process.

Perhaps I'm running out of memory while trying to load the entire game (does the new async loading take significantly more memory?), but incrementally loading dependencies only when needed (or with just a bit of lookahead) would solve a lot of problems.

bfed-stops-loading-on-google-pixel-3xl.png

Hexstream commented 1 year ago

Another user reports the same problem, but this does work on my new phone with a lot more RAM (12GB instead of 4GB).