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

refactor: allocate smaller tuples for query streams #905

Merged
merged 2 commits into from
Sep 19, 2022

Conversation

jyeshe
Copy link
Member

@jyeshe jyeshe commented Sep 15, 2022

What

  • Unify scope deserialization by separating key boundary from the gen or txi scope
  • Remove use of max_blob for all /v2/contract/calls and /v2/contract/logs except for data log filtered one
  • Remove use of max_blob for name and auction prefixing
  • Leverage Erlang term comparison to allocate less memory on query key boundaries
  • Adds unit test coverage for /v2/contract/calls and /v2/contract/logs

Why

  • Allocate less memory by replacing max_256bit_int with nil
  • max_blob is a 256KB

Notes

  • Gladly the BEAM doesn't reallocate every time the max_blob
  • Analysis of NFT token id with negative values will be done in a separte PR

@jyeshe jyeshe self-assigned this Sep 15, 2022
@jyeshe jyeshe marked this pull request as draft September 15, 2022 01:43
@jyeshe
Copy link
Member Author

jyeshe commented Sep 15, 2022

Adding test cases for contract logs and calls ...

@jyeshe jyeshe changed the title chore: allocate smaller tuples for default scopes refactor: allocate smaller tuples for default scopes Sep 15, 2022
@jyeshe jyeshe changed the title refactor: allocate smaller tuples for default scopes refactor: allocate smaller tuples for query streams Sep 15, 2022
@jyeshe jyeshe marked this pull request as ready for review September 19, 2022 04:28
@jyeshe jyeshe merged commit bd7229b into master Sep 19, 2022
@jyeshe jyeshe deleted the smaller_default_scopes branch September 19, 2022 22:47
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.

3 participants