quick-draw-everywhere icon indicating copy to clipboard operation
quick-draw-everywhere copied to clipboard

Loop decoding

Open cataloque opened this issue 4 years ago • 1 comments

Dear developers, I found some potential slow operations of bitmap displaying in quick-draw-everywhere.

In the position of quick-draw-everywhere: com.byox.drawview.c a() the bitmap object is created with the invocation of decodeByteArray(), I found a() is invoked by: (1) com.byox.drawview.views.DrawView onDraw() onDraw() callbacks are frequently invoked and this means that there will be many bitmap objects being created.so it's better to add cache for bitmap,that can prevent Loop decoding. and image decoding is done in UI thread. onDraw() callbacks are frequently invoked and this means that there will be many bitmap objects being created. Since image decoding is slow, for performance considerations, we should perform these operations in worker threads (e.g., via AsyncTask).

Looking forward to your response and hope I can help improve Conversations. Thanks.

cataloque avatar Mar 01 '20 09:03 cataloque

Feel free to create a PR, but I believe the issue you're describing is that of the library I use in the app

https://github.com/ByoxCode/DrawView

Maybe consider opening an issue there

rosenpin avatar Mar 01 '20 15:03 rosenpin