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

[FEATURE] Early-termination while processing contentstream #190

Open
gunnsth opened this issue Oct 21, 2019 · 0 comments
Open

[FEATURE] Early-termination while processing contentstream #190

gunnsth opened this issue Oct 21, 2019 · 0 comments

Comments

@gunnsth
Copy link
Contributor

@gunnsth gunnsth commented Oct 21, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Issue Overview
Performance
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.