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

DynamicObject&DynamicArray can be shared between runtimes #418

Closed
wants to merge 1 commit into from
Closed

DynamicObject&DynamicArray can be shared between runtimes #418

wants to merge 1 commit into from

Conversation

vanishs
Copy link

@vanishs vanishs commented Jul 28, 2022

I have a complex and large json read-only object that needs to be shared between each runtime to save memory and cpu usage. Now I made some changes to make DynamicObject/DynamicArray implement this function

@dop251 dop251 closed this in fca9b95 Jul 29, 2022
@vanishs
Copy link
Author

vanishs commented Jul 29, 2022

@dop251 Is there anything wrong with this code that needs to be improved?

@dop251
Copy link
Owner

dop251 commented Jul 29, 2022

See the mentioned commit. It should provide the functionality you're after. Let me know if there is any problem.

@vanishs
Copy link
Author

vanishs commented Jul 29, 2022

Sorry, I just saw close pr on my phone just now, but I didn't see you commit the code. Now it seems to meet my current needs. thanks.

Gabri3l pushed a commit to mongodb-forks/goja that referenced this pull request Sep 1, 2022
Gabri3l added a commit to mongodb-forks/goja that referenced this pull request Mar 22, 2023
* Implemented classes (including private elements). Closes dop251#349.
* Fixed "delete 'a'.prop". Optimised a[<const_string>] to a.<const_string>
* Enabled more tests and fixed some bugs. Closes dop251#410.
* Fixed this binding initialisation. Fixes dop251#415.
* Added NewSharedDynamicObject() and NewSharedDynamicArray(). Closes dop251#418.
* Optimised memory usage when generating function and class initialisation code
* Fixed Export() value for arrow functions and classes. Added Runtime.AssertConstructor. Closes dop251#419.
* Always create a map when exporting. Fixes dop251#422.
* Refactored conversion to primitive. Always use `String()` method if defined. Closes dop251#423.
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.

2 participants