-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
Minify projects #148
Comments
Something that might be worth adding is something like the project.json size reducer, especially compressing identifiers. |
That's vaguely what I'm referring to for project.json. if we pretend that the editor doesn't exist and decide to effectively become a project obfuscator, we can do some much, much more aggressive things than that project |
Compressions that do not affect the editor (thus can be applied to all projects):
Compressions that affect the editor in some way (but acceptable in immutable projects):
Compression that violates the Scratch 3.0 file format and VM implementation but is acceptable:
|
This uses some disabled-by-default code from TW/scratch-vm to optimize projects It's not optimal, but it's safe outside of the editor while still saving significant space Part of #148
Another easy way to add lossy compression is to add an option to initialize all variables to |
sb3 project.json compression has landed
There's probably a couple hundred more KB that could be saved without breaking projects. Beyond that point, we would probably be better off making a binary file format instead of using JSON. Note that many of these projects contain many large assets that make any project.json optimizations almost meaningless. Some of those will be investigated next. |
Yes, especially audio files. Scratch projects can play |
Scratch projects tend to be very large, we should try to address that with lossy compression that doesn't affect project behavior
The text was updated successfully, but these errors were encountered: