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

Library Performance Versus CLI #7

Closed
Grant3W opened this issue Jan 3, 2024 · 3 comments
Closed

Library Performance Versus CLI #7

Grant3W opened this issue Jan 3, 2024 · 3 comments

Comments

@Grant3W
Copy link

Grant3W commented Jan 3, 2024

Thank you for your work on this project. It looks really exciting and I can't wait to start using this in my projects. I've spun up the example you give from the library, however, the performance seems to be degraded compare to the CLI.

When running from a Rust project with ocrs as a library, my image took ~30 seconds, whereas the same image took ~1 second with the CLI.

Any idea where I could be going wrong? I can see from debugging that the delay is coming from the phase1 and phase 3 calls from the example. I tried turning debug off, but that hasn't helped.

@Grant3W
Copy link
Author

Grant3W commented Jan 3, 2024

Please disregard this. I simply needed to mark the build as release with --release and this resolved the issue.

@Grant3W Grant3W closed this as completed Jan 3, 2024
@robertknight
Copy link
Owner

The rten dependency is the machine learning runtime which has to always be compiled in release mode for reasonable performance. Other parts of the code can be compiled in debug mode for better backtraces etc. I should make a note of this in the README.

@Grant3W
Copy link
Author

Grant3W commented Jan 3, 2024

That's good to know, I appreciate the explanation.

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

2 participants