scratchfoundation / scratch-flash

Open source version of the Scratch 2.0 project editor. This is the basis for the online and offline versions of Scratch found on the website.
https://scratch.mit.edu
GNU General Public License v2.0
1.33k stars 512 forks source link

Large projects cause "net::ERR_INSUFFICIENT_RESOURCES" #619

Closed as-com closed 5 years ago

as-com commented 9 years ago

When large projects with lots (thousands) of assets are loaded for the second time (assets are cached on disk), the console is spammed with those errors, and many assets disappear causing strange behavior in projects.

See the forum topic for more information: http://scratch.mit.edu/discuss/topic/88418/

as-com commented 9 years ago

Bump?

2jour commented 9 years ago

@as-com included a sauce recording :).. Thank you this is very helpful https://saucelabs.com/tests/8b3f6c5ed6d94838bd739c8762716f87

2jour commented 9 years ago

Browser Chrome 40 OS Windows 8.1

Reloading the project in the sauce video causes google chrome to crash .

Firefox 35 freezes

as-com commented 9 years ago

The issue here is that the player is literally sending 4,000 or so requests all at once. This causes the errors and crashing.

For a visualization of this, I created a HAR (download: https://owncloud.andrewsun.com/public.php?service=files&t=25ad4f17c53e86816c2cd960512524cb) that can be visualized here: http://www.softwareishard.com/har/viewer/. There is a wall of requests for the project assets, which is bad.

I think the solution is to make the player send a small batch of requests, maybe 100, wait for them to finish, and send another batch.

kaschm commented 9 years ago

Hi @as-com, thanks for submitting this issue. Your suggested fix seems like the right path - thank you for that too. Unfortunately, we're really busy with our current roadmap. We'll try to get to this soon but we're not exactly sure when.

as-com commented 9 years ago

Additional information: This issue is causing random "Aw Snap!" crashes on Chrome 41 on Xubuntu Linux 14.04 when loading some of my asdfscratch projects.

People in the comments also regularly complain about glitchiness or silence caused by missing assets.

as-com commented 9 years ago

https://scratch.mit.edu/projects/76759248/ Another project affected by the bug