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

Invent a better way to retain bytes due to limitations of Annotator #4009

Closed
lehins opened this issue Jan 24, 2024 · 0 comments · Fixed by #4733
Closed

Invent a better way to retain bytes due to limitations of Annotator #4009

lehins opened this issue Jan 24, 2024 · 0 comments · Fixed by #4733
Assignees
Labels

Comments

@lehins
Copy link
Collaborator

lehins commented Jan 24, 2024

Due to applicative nature of Annotator it is impossible to look into the item a that is being decoded if all you have available is the Decoder s (Annotator a). This limitation prevents us from guarding against duplicate detection in Maps and Sets.

Moreover there is real performance overhead of using Annotator, since the way it works is by constructing a huge closure that can later be applied to a ByteString

By recent switch to versioned decoder we have a better way to deal with this issue. A proof of concept has been implemented in this branch: https://github.com/IntersectMBO/cardano-ledger/tree/lehins/alternative-to-annotator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant