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

Serialization optimizations #215

Open
michbarsinai opened this issue Aug 15, 2023 · 0 comments
Open

Serialization optimizations #215

michbarsinai opened this issue Aug 15, 2023 · 0 comments

Comments

@michbarsinai
Copy link
Member

Stub out the “InterpreterData idata” field of every org.mozilla.javascript.InterpretedFunction loaded into your program. This isn’t trivial; I have prior art in https://github.com/szegedi/spring-web-jsflow. Specifically, the ScriptStorage class has two maps, functionsToStubs and stubsToFunctions and a FunctionStubFactory that populates them for every script file loaded into the system. ScriptStorage exposes these to the FlowStateSerializer class (which is the actual class that serializes/deserializes continuations) through its PersistenceSupport interface.

That implementation also calculates cryptographic hashes of functions. Since BPjs' continuations remain within a single Java program execution, that’s not necessary.

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

No branches or pull requests

1 participant