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

DocumentHead without NAVM #12

Open
cole-miller opened this issue Jun 5, 2022 · 1 comment · May be fixed by #31
Open

DocumentHead without NAVM #12

cole-miller opened this issue Jun 5, 2022 · 1 comment · May be fixed by #31

Comments

@cole-miller
Copy link
Contributor

Currently parsing::document always requires enough bytes be presented to determine whether there's a NAVM chunk, and if one is found, the whole chunk must be presented. An important justification for the whole incremental parsing strategy is that you can learn about a document when you only have the first blob of N bytes (delivered over the wire, say), where N is smallish, instead of waiting for all the data to arrive. Always consuming the NAVM chunk increases that N. I don't know whether the increase is important, and I also don't have a detailed scheme for consuming the NAVM chunk "lazily" yet.

@cole-miller
Copy link
Contributor Author

Idea: introduce NavmP, and then DocumentHead::MultiPage has Either<NavmP, ComponentP> instead of RawNavm, ComponentP. Implement NavmP::feed with the obvious semantics. There is an edge case where we get enough bytes to parse the DIRM stuff but not enough to determine whether there is a NAVM or not; I think in that case we should just demand more bytes (Progress::None)

@cole-miller cole-miller linked a pull request Feb 3, 2024 that will close this issue
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 a pull request may close this issue.

1 participant