scratchfoundation / scratchfoundation/scratch-editor
chromium shows question marks for more than 1350 costumes
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 281
- Forks
- 276
- Avg merge
- 7d 8h
- Merged PRs (30d)
- 6
Description
Migrated from scratch-vm as github readme states scratch-vm is outdated. https://github.com/scratchfoundation/scratch-vm/issues/5439
Expected Behavior
All costumes load correctly on chromium https://scratch.mit.edu/projects/1205610476/
Actual Behavior
chromium fails to load more 1350 costumes due limit of 2700 pending network requests and falls back to default unknown webgl texture for network cancelled costumes
Steps to Reproduce
Save a project with more than 1350 costumes
System Details
This occurs on all chromium based browsers (chrome, edge, brave etc...) for sb3 saved projects. Works fine on scrach3.0 win32 app, firefox and webkit.
Scratch VM creates async web request to download the 2048 images but chromium limits pending web requests to NetworkContext::CanCreateLoader returning false. Chrome dislike having more than (kMaxOutstandingRequestsPerProcess = 2700) concurrent loading attempts at a time from a single process (max_loaders_per_process_)
Turbowarp works as batches the downloads. This is a regression from scratch 2.0
Screenshots
>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing Scratch VM's asynchronous costume image downloads and the Chromium NetworkContext loader limit described in the issue. Compare the batching behavior in Turbowarp with the current scratch-editor loading path. Done means projects with more than 1350 costumes load all costumes correctly in Chromium without unknown textures or cancelled downloads.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100