Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Reduce a number of Rust function calls from JavaScript code #35

Closed
Tracked by #26
matjazv opened this issue Aug 26, 2022 · 0 comments · Fixed by #64
Closed
Tracked by #26

Reduce a number of Rust function calls from JavaScript code #35

matjazv opened this issue Aug 26, 2022 · 0 comments · Fixed by #64
Assignees
Milestone

Comments

@matjazv
Copy link
Contributor

matjazv commented Aug 26, 2022

Description

  • when calling Rust bindings from JavaScript code we get some execution performance penalty due to an additional code which needs to be executed because of a bridge between two different programming languages
  • A good example are functions StateReadWriter.set() and StateReadWriter.get() in state_db.js file. In these two functions there are multiple Rust binding calls. Because these two functions are heavily used, overall code execution performance is slow because of a lot of bridge calls between JavaScript and Rust code.
  • develop an idea how such JavaScript functions could have less Rust function calls

Acceptance Criteria

  • JavaScript code has less Rust function calls

Additional Information

  • one idea is that JavaScript part of lisk-db will have it's own temporary database/cache to store and read data inside it and only call Rust code in case that expected data won't be present in its database/cache
@shuse2 shuse2 added this to the Sprint 9 milestone Sep 26, 2022
@hrmhatef hrmhatef self-assigned this Sep 29, 2022
@shuse2 shuse2 closed this as completed in #64 Oct 7, 2022
shuse2 added a commit that referenced this issue Oct 7, 2022
Reduce the number of Rust call in JS side - Closes #35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants