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

[Task]: Use cached sqlite statements #423

Closed
1 of 5 tasks
Mirko-von-Leipzig opened this issue Jul 27, 2024 · 0 comments
Closed
1 of 5 tasks

[Task]: Use cached sqlite statements #423

Mirko-von-Leipzig opened this issue Jul 27, 2024 · 0 comments
Assignees

Comments

@Mirko-von-Leipzig
Copy link
Contributor

Node's components affected by this task

  • RPC
  • Block producer
  • Store
  • Protobuf messages
  • Testing

What should be done?

We currently use prepare to create sqlite statements, however we should use prepare_cached as parsing a statement is a non-trivial cost.

How should it be done?

Analyze the sql statements in crates/store/src/db/sql.rs and change every common one to use prepare_cached.

Exceptions should be made for statements which should be rare. Alternatively (and maybe additionally), we should change the cache size which currently defaults to 16 to something large enough to handle all statements..

When is this task done?

All relevant prepare are changed to prepare_cached and the default cache size has been changed (or at least address why it should not be changed).

Additional context

#419 (comment)

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

No branches or pull requests

1 participant