Skip to content

Migrate Bitmap Memory Analyzer skill snippets - #1357

Open
seventhmoon wants to merge 1 commit into
mainfrom
bitmap-memory-analyzer-snippets
Open

seventhmoon wants to merge 1 commit into
mainfrom
bitmap-memory-analyzer-snippets

Conversation

@seventhmoon

Copy link
Copy Markdown

Code snippets are for:

List of modifications:

  • Common-memory-defects page: Added compiled Kotlin remediation snippets (BitmapDefectFixes.kt) for Lottie in-memory onTrimMemory/ProcessLifecycleOwner ON_STOP clearing (android_perf_bitmap_lottie_trim), Fresco downsampling and cache eviction (android_perf_bitmap_fresco_resize_and_trim), Glide viewport-bounded downsampling (android_perf_bitmap_glide_viewport_downsample), Compose LazyVerticalGrid adaptive layout (android_perf_bitmap_compose_adaptive_grid), Coil onTrimMemory/ON_STOP clearing and AsyncImage (android_perf_bitmap_coil_trim_and_async_image), and Glide ProcessLifecycleOwner ON_STOP cache clear (android_perf_bitmap_glide_on_stop_clear).
  • Perfetto-agent-workflows page: Added withContext(NonCancellable) coroutine teardown snippet (android_perf_bitmap_noncancellable_teardown) in BitmapDefectFixes.kt.
  • Companion-skills-and-ci page: Added Jetpack Macrobenchmark MemoryUsageMetric (Mode.Max + Mode.Last) and FrameTimingMetric snippet (android_perf_bitmap_macrobenchmark) in FeedBitmapMemoryBenchmark.kt.
  • Verified compilation with ./gradlew :performance:compileDebugKotlin :performance:compileDebugAndroidTestKotlin (BUILD SUCCESSFUL).

@snippet-bot

snippet-bot Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 8 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@compose-devrel-github-bot

compose-devrel-github-bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

⚡ Jetpack Compose Performance Review

Status: ✅ No Jetpack Compose performance issues found in the changed code.

The newly introduced composables (AdaptiveImageFeedGrid and DownsampledRasterCard) follow Jetpack Compose performance best practices. Specifically, the lazy grid properly supplies primitive keys and content types to enable slot reuse, and raster decoding is offloaded asynchronously via Coil's AsyncImage.

Reviewed commit 96fc2a9 · workflow run · This comment is updated on every push; findings are posted as inline review comments.

@seventhmoon
seventhmoon force-pushed the bitmap-memory-analyzer-snippets branch from faf994d to 96fc2a9 Compare December 5, 2026 23:47

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

2 participants