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

Compiler: ignore objects #744

Open
josephjclark opened this issue Aug 14, 2024 · 3 comments
Open

Compiler: ignore objects #744

josephjclark opened this issue Aug 14, 2024 · 3 comments

Comments

@josephjclark
Copy link
Collaborator

A good optimisation in the compiler would be to ignore structures like objects, which we don't really do anything with.

Parsing large JSON objects is very intensive for the compiler.

What we'd ideally do is make the visitor quit when it starts traversing a structure like an object.

Counter point: we do need to support lazy state in object properties. Oh but not in a callback. So in some places yeah, we might be able to exit early.

@github-project-automation github-project-automation bot moved this to New Issues in v2 Aug 14, 2024
@josephjclark
Copy link
Collaborator Author

This may be affecting MSF

And maybe it's not objects per say, but any const declaration. Or even any nested scope, because all compiler stuff really only runs at the top level

@doc-han
Copy link
Collaborator

doc-han commented Dec 19, 2024

This may be affecting MSF

And maybe it's not objects per say, but any const declaration. Or even any nested scope, because all compiler stuff really only runs at the top level

Can you provide example scenarios?

@josephjclark
Copy link
Collaborator Author

Hey @doc-han - nothing to worry about for now, I don't think this is the problem after all. Just wanted to make a note for myself while I was on a call

For the record the scenario is a 22k line Javscript source file, most of which is JSON data

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

No branches or pull requests

2 participants