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

Explore removing unnecessary allocation + laziness in JavaScript #168

Open
evinism opened this issue Jun 18, 2022 · 0 comments
Open

Explore removing unnecessary allocation + laziness in JavaScript #168

evinism opened this issue Jun 18, 2022 · 0 comments

Comments

@evinism
Copy link
Owner

evinism commented Jun 18, 2022

Right now, when performing a query over a JS object, the entire object is recursively copied. For simple queries over large objects, this can get a little silly. For example, running the query count @ over a large array constructs a brand new array from scratch to query over, as executed in the input garden wall.

This is obviously not ideal. We should somehow be operating the MistQL semantics over the array that exists. It's certain that for some operations, we absolutely need to build a new array (e.g. @ | map @ + 1), but for simple queries, that shouldn't be the case.

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