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

FR: Lazy section evaluation #436

Open
ershov opened this issue Aug 26, 2023 · 0 comments
Open

FR: Lazy section evaluation #436

ershov opened this issue Aug 26, 2023 · 0 comments
Labels

Comments

@ershov
Copy link

ershov commented Aug 26, 2023

Feature request

Add a -lazy flag to the section command so that if the section is collapsed and its size is known before it is parsed, the actual parsing is skipped until the section is expanded.

This would be very beneficial for big files with complex structure like archives or databases.

Alternatively, could just add a -size argument and do it automatically if it's accompanied with a -collapsed. An additional benefit is that it would also do an automatic error recovery in that section: in case of an error within the section, the outer structures will still be parsed properly.

TODO: Consider the use of state variables. In case if the code uses/changes some of them, that flag still should be explicit since it changes the behavior.

@kainjow kainjow added the Feature label Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants