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

[Runtime] Add a cache to the ObjectRuntime for caching runtime objects. #2947

Open
pause125 opened this issue Nov 23, 2024 · 3 comments
Open
Labels
proposal New external API or other notable changes
Milestone

Comments

@pause125
Copy link
Collaborator

Proposal Details

Add a cache to the ObjectRuntime for caching runtime objects.

Once the runtime objects are read from cache, there is no need to deserialize object from bytes, thus improving the speed of transaction execution.

@pause125 pause125 added the proposal New external API or other notable changes label Nov 23, 2024
@pause125
Copy link
Collaborator Author

pause125 commented Nov 23, 2024

There is a problem that when calling RuntimeObject::into_change, the value of RuntimeObject is moved, but we need to put it in the cache, so we need to implement a reference version of into_change. This requires implementing a reference version of GlobalValue::into_effect in the move repo.

@pause125
Copy link
Collaborator Author

There are two more issue we need consider:

  1. ObjectRuntime::load_object returns &mut RuntimeObject. If the cache is added, the reference can be returned from two sources: ObjectRuntime itself and the cache. This may make a lot of the interface to be changed.
  2. As ObjectRuntime::load_object is recursive, it may result in more than one mut reference to the cache.

@jolestar jolestar added this to the TBD milestone Nov 24, 2024
@jolestar
Copy link
Contributor

Make this issue TBD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal New external API or other notable changes
Projects
Status: No status
Development

No branches or pull requests

2 participants