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

Use scale-decode to help optimise event decoding #607

Merged
merged 4 commits into from Aug 10, 2022
Merged

Conversation

jsdw
Copy link
Collaborator

@jsdw jsdw commented Aug 2, 2022

Skip over event bytes using the IgnoreVisitor from scale_decode, and only decode fields into Values if we ask for them explicitly.

Also avoid cloning event bytes around the place by reusing the same Vec (Arc<[u8]>) everywhere and avoiding any string cloning (again, pushing the work until the user asks for pallet/variant name), and tidy the API around working with events a little.

This builds off the big API change of #593.

@jsdw jsdw changed the title USe scale-decode to help optimise event decoding Use scale-decode to help optimise event decoding Aug 2, 2022
@jsdw jsdw changed the base branch from jsdw-wip-api-changes to master August 3, 2022 10:02
@jsdw jsdw changed the base branch from master to jsdw-wip-api-changes August 3, 2022 10:04
Base automatically changed from jsdw-wip-api-changes to master August 8, 2022 10:55
Copy link
Member

@ascjones ascjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jsdw jsdw merged commit cb43ffe into master Aug 10, 2022
@jsdw jsdw deleted the jsdw-use-scale-decode branch August 10, 2022 10:59
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.

None yet

3 participants