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

Implement faster parser for the Faithful IPLD objects #195

Closed
4 tasks done
linuskendall opened this issue Nov 27, 2024 · 1 comment
Closed
4 tasks done

Implement faster parser for the Faithful IPLD objects #195

linuskendall opened this issue Nov 27, 2024 · 1 comment

Comments

@linuskendall
Copy link
Contributor

linuskendall commented Nov 27, 2024

Currently we are using IPLD Unmarshal:

_, err := ipld.Unmarshal(epochRaw, dagcbor.Decode, &epoch, ipldbindcode.Prototypes.Epoch.Type())

This seems to be slow because it uses reflections and other tools to support the decoding.

In our case we could implement a faster decoder by skipping this step and instead implementing faster decoding inside the Faithful software.

  • Benchmark the current IPLD decode
  • Implement a new decoder for the faithful IPLD schema / objects
  • Benchmark the new decoder
  • Implement proper testing for the decoder (unit tests)

We have already something similar in Rust:

pub fn from_cbor(val: serde_cbor::Value) -> Result<Epoch, Box<dyn Error>> {

This could be rewritten in golang and integrated with Faithful.

@linuskendall
Copy link
Contributor Author

Implemented .

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