Remove the decompiler block limit #10010
Merged
+20
−61
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
People run into this all the time on the forum, most recently here:
https://forum.makecode.com/t/my-code-seems-to-big-to-be-decompile-in-block/28637/4
If you have a very large blocks project, you can get stuck if you switch to text because we have a limit in place for the maximum size of a project we decompile. This limit was added many years ago in response to an issue where someone tried to decompile a gigantic script (they had copy+pasted code over and over again) and it basically hung the browser when Blockly tried to load the gigantic workspace file we generated.
I think this made sense at the time, but nowadays Blockly perf has improved and I don't think we need the restriction anymore. I was able to decompile a 9000 block program locally just now (on my admittedly nice laptop) and it was fine, it just took a while for Blockly to render the workspace.