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 improvement suggestion #952

Open
cataloque opened this issue Apr 18, 2020 · 0 comments
Open

Performance improvement suggestion #952

cataloque opened this issue Apr 18, 2020 · 0 comments

Comments

@cataloque
Copy link

cataloque commented Apr 18, 2020

Dear developers,
I found an API, setImageURI(), is used in the-blue-alliance-android. For setImageURI(), Google says this: " This does Bitmap reading and decoding on the UI thread, which can cause a latency hiccup. ”
In addition, using this method to create a picture cannot handle the picture size. If the loaded picture is too large, it may cause OOM.
If that's a concern, consider using setImageDrawable(android.graphics.drawable.Drawable) or setImageBitmap(android.graphics.Bitmap) and BitmapFactory instead.

I also noticed that in the following code,
om.thebluealliance.androidclient.activities.ConfirmImageSuggestionActivity. lambda.cacheAndLoadImage();bitmap object is created with the invocation of decodeStream(). However, decodeStream() is a slow operation and it is in the UI thread. maybe we should move Bitmap reading and decoding to a background thread.
Could you kindly have a look at this issue? Thanks.

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

1 participant