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

fix: remove empty array elements to reduce scope transfer size #570

Merged
merged 1 commit into from
Dec 21, 2023

Conversation

Siolto
Copy link
Collaborator

@Siolto Siolto commented Dec 21, 2023

After going deep down the rabbit hole, it turns out that the binding context object in already a small FE app is humongously huge. Thus, when (in Node.js) a getBindingContext() is called on a located control for subsequent asserts on the binding object, the binding context object transferred between the browser- and the Node.js-scope is > 100 MB (!), causing serialisation operations fail.

This PR "cleans" the located controls internal object properties already in browser-scope by removing all private properities (starting with _) and null Array members.
The "cleaned" object is then only a fraction of its original size, (hopefully) making everyone more happy.

Closes #557

Co-authored-by: Volker Buzek <volker.buzek@js-soft.com>
@Siolto Siolto changed the title fix: remove empty array elements to reduce to reduce scope transfer size fix: remove empty array elements to reduce scope transfer size Dec 21, 2023
Copy link
Contributor

@vobu vobu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎄

@vobu vobu merged commit f2843c1 into main Dec 21, 2023
13 checks passed
@marianfoo
Copy link
Member

Wow, thank you for that fix!
Interesting insights

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

Successfully merging this pull request may close these issues.

unknown error: cannot deserialize the result value received from Runtime.callFunctionOn
3 participants