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

Performance Improvements #28

Closed
sdoward opened this issue Aug 10, 2017 · 1 comment
Closed

Performance Improvements #28

sdoward opened this issue Aug 10, 2017 · 1 comment

Comments

@sdoward
Copy link
Contributor

sdoward commented Aug 10, 2017

First thanks for the library it's been a big help for the project I am working on.

I can see some opportunities to make the lib faster. The bottle necks are the moment (unsurprisingly) are reading and writing to disk.

Testing with the GT-i9515 the read takes between 600ms - 1200ms. An obvious way to resolve this would be to hold the original Bitmap in memory. This would remove this bottle neck completely. Is there some reason for not doing this originally?

As for writing, some clients might not need CropIwa to write to disk.
My use case is that I merge the cropped image with another image before I write to disk. So the flow at the moment is..

  • setUri()
    • CropIwaread
  • Crop file
    • CropIwa read and write
  • Merge file
    • Client read and write

If CropIwa was able to pass back the cropped bitmap I would see huge performance improvements.

Would it be feasible to provide 2 Callback listeners? 1 for the Uri and 1 for the Bitmap?

I am happy to contribute if you think either of these are good directions to take.

@polyak01
Copy link
Contributor

@sdoward nice. Wait your for pull requests ;)

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