Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up[FEATURE] Early-termination while processing contentstream #190
Labels
Projects
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
The problem is inefficiency when simply looking for a single operand and then stopping processing.
For example, if only looking for a single colored pixel in a page.
Describe the solution you'd like
It would make sense to be able to set a stop flag on the processor and return out of the handler, which would cause the processor to return out without further processing.
Describe alternatives you've considered
An alternative implementation using channels has been done by a collaborator.
https://github.com/peterwilliams97/unipdf/blob/early.termination/contentstream/parser.go
https://github.com/peterwilliams97/unidoc-examples/blob/imagemark.classify/testing/pdf_count_color_pages_bench.go
If the simple stop flag would be enough to get this done, I believe it would be more simple method.
Additional context
N/A