Skip to content
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

Reduced compatibility layer for extension blocks that don't use the block utility? #244

Open
CST1229 opened this issue Feb 8, 2025 · 0 comments

Comments

@CST1229
Copy link

CST1229 commented Feb 8, 2025

This is an idea that may decrease the overhead of the extension compatibility layer for some blocks. Basically, if an extension block's function doesn't have a second argument, or has it but doesn't use it in the body text, the compiler could maybe use a reduced version of the extension compatibility layer (runInCompatibilityLayer) that doesn't initialize the block utility. That could allow some extension blocks (e.g utility operator blocks) to run a bit faster.

There could maybe even be a blockInfo property synchronous: true that could be set to true if your block doesn't return a Promise. That could allow the compiler to completely omit the compatibility layer, just calling the block function directly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant