-
-
Notifications
You must be signed in to change notification settings - Fork 932
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
Reduced memory usage to avoid any OOM. #93
Reduced memory usage to avoid any OOM. #93
Conversation
This is a bit confusing. I think that But in I think all the benefit you are seeing is just due to crop.recycle(). |
I tried it just with |
I understand what you say, but the developer page is wrong in this, it's the opposite. You can try yourself, see I know this because I have worked on this recently. I honestly don't understand the developer page example... I'd say, let's merge just the recycle call for now |
I don't how to explain your results, different shoot orientations, the code you are running, some obscure native cache, I don't know. I'm getting good results in the demo app so I think you should just pass a lower value of Since we are trying to reduce memory here, loading bigger bitmaps in the library code is not a good idea :) recycle() will not solve the main issue, but it's needed. If you can go back to just that, we can merge this |
Ok, I understand what you are saying. I always did the same test case: take a picture with |
The real issue is here and it is not affected by your changes because it uses |
57ab554
to
494b731
Compare
@natario1 Done! Thank you! |
Codecov Report
|
@RobertoMorelos thanks a lot for your time. |
Implements
#91
Description
Reduced memory usage to avoid any OOM.
Before
Library could lead to OOM due to the huge amount of memory allocated by the bitmap.
(Java memory increases up to 60 MB, sometimes up to 100 MB!)
After
Memory usage reduced and released the bitmap memory allocated.
(Java memory increases from 17 MB to 25 MB only)
Reviewers
See reviewer section.