-
Notifications
You must be signed in to change notification settings - Fork 63
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
REPLAY-1890: Implement pool of reusable bitmaps #1554
REPLAY-1890: Implement pool of reusable bitmaps #1554
Conversation
bd8e3f1
to
f703ef9
Compare
Codecov Report
@@ Coverage Diff @@
## feature/base64-jmoskovich #1554 +/- ##
=============================================================
- Coverage 83.63% 83.32% -0.30%
=============================================================
Files 439 443 +4
Lines 14977 15070 +93
Branches 2258 2272 +14
=============================================================
+ Hits 12525 12557 +32
- Misses 1879 1923 +44
- Partials 573 590 +17
|
...ion-replay/src/main/kotlin/com/datadog/android/sessionreplay/internal/utils/DrawableUtils.kt
Show resolved
Hide resolved
...src/main/kotlin/com/datadog/android/sessionreplay/internal/async/RecordedDataQueueHandler.kt
Outdated
Show resolved
Hide resolved
...lay/src/main/kotlin/com/datadog/android/sessionreplay/internal/recorder/base64/BitmapPool.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of backing up the BitmapPool
with an LruCache
. There are still things to address in here but the idea works.
...lay/src/main/kotlin/com/datadog/android/sessionreplay/internal/recorder/base64/BitmapPool.kt
Show resolved
Hide resolved
...lay/src/main/kotlin/com/datadog/android/sessionreplay/internal/recorder/base64/BitmapPool.kt
Show resolved
Hide resolved
...lay/src/main/kotlin/com/datadog/android/sessionreplay/internal/recorder/base64/BitmapPool.kt
Show resolved
Hide resolved
...lay/src/main/kotlin/com/datadog/android/sessionreplay/internal/recorder/base64/BitmapPool.kt
Outdated
Show resolved
Hide resolved
...lay/src/main/kotlin/com/datadog/android/sessionreplay/internal/recorder/base64/BitmapPool.kt
Outdated
Show resolved
Hide resolved
...ion-replay/src/main/kotlin/com/datadog/android/sessionreplay/internal/utils/DrawableUtils.kt
Outdated
Show resolved
Hide resolved
...src/test/kotlin/com/datadog/android/sessionreplay/internal/recorder/base64/BitmapPoolTest.kt
Outdated
Show resolved
Hide resolved
...src/test/kotlin/com/datadog/android/sessionreplay/internal/recorder/base64/BitmapPoolTest.kt
Outdated
Show resolved
Hide resolved
...src/test/kotlin/com/datadog/android/sessionreplay/internal/recorder/base64/BitmapPoolTest.kt
Outdated
Show resolved
Hide resolved
...src/test/kotlin/com/datadog/android/sessionreplay/internal/recorder/base64/BitmapPoolTest.kt
Show resolved
Hide resolved
ab97424
to
ba3545f
Compare
...lay/src/main/kotlin/com/datadog/android/sessionreplay/internal/recorder/base64/BitmapPool.kt
Outdated
Show resolved
Hide resolved
...lay/src/main/kotlin/com/datadog/android/sessionreplay/internal/recorder/base64/BitmapPool.kt
Outdated
Show resolved
Hide resolved
080e566
to
c0a9969
Compare
c0a9969
to
227afe9
Compare
227afe9
to
8002635
Compare
What does this PR do?
Adds a reusable bitmap pool for base64.
Motivation
Reduce the number of new bitmaps created.
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)