# Py's blog

P-Y's blog

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## New roots, same Square

DevFeed: [New roots, same Square](<https://devfeed.tech/articles/new-roots-same-square-25626.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/new-roots-same-square>)

Author: Pierre-Yves Ricau

Published: 2026-07-02T20:52:29Z

Content type: opinion

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [remote](<https://devfeed.tech/tags/remote.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>), [time](<https://devfeed.tech/tags/time.md>), [timezone](<https://devfeed.tech/tags/timezone.md>), [work](<https://devfeed.tech/tags/work.md>)

### AI overview

The author describes moving from San Francisco back to France while continuing to work for Square remotely. The article discusses the administrative and family considerations behind the move, timezone differences, and how AI-enabled autonomy provides more uninterrupted focus time in software engineering.

### Source excerpt

Exactly one year ago, after 12 years in San Francisco, I moved back to France. Life since has been a whirlwind: selling the condo, moving a container overseas, rediscovering French culture (I had to r

## Parallelism with Android SQLite

DevFeed: [Parallelism with Android SQLite](<https://devfeed.tech/articles/parallelism-with-android-sqlite-25628.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/parallelism-with-android-sqlite>)

Author: Pierre-Yves Ricau

Published: 2025-02-05T05:35:36Z

Content type: tutorial

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [SQLite](<https://devfeed.tech/topics/sqlite.md>), [Android](<https://devfeed.tech/topics/android.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [IO](<https://devfeed.tech/topics/io.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [blocking](<https://devfeed.tech/tags/blocking.md>), [connection-pool](<https://devfeed.tech/tags/connection-pool.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [io](<https://devfeed.tech/tags/io.md>), [parallelism](<https://devfeed.tech/tags/parallelism.md>), [performance](<https://devfeed.tech/tags/performance.md>), [sqlite](<https://devfeed.tech/tags/sqlite.md>)

### AI overview

This article explains how Android SQLite's default single-connection behavior causes parallel queries on the same database to block one another. It examines how excessive query parallelism can consume coroutine dispatcher threads and delay unrelated I/O tasks, then discusses using separate dispatchers for blocking database work.

### Source excerpt

The SQLDelight documentation provides this example: val players: Flow> = playerQueries.selectAll() .asFlow() .mapToList(Dispatchers.IO) This looks reasonable, right? In the Square Point Of Sale application, we recently ...

## Rendering the Java heap as a Treemap

DevFeed: [Rendering the Java heap as a Treemap](<https://devfeed.tech/articles/rendering-the-java-heap-as-a-treemap-25629.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/rendering-the-java-heap-as-a-treemap>)

Author: Pierre-Yves Ricau

Published: 2024-09-25T04:37:22Z

Content type: tutorial

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Graphs](<https://devfeed.tech/topics/graphs.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [computer-science](<https://devfeed.tech/tags/computer-science.md>), [garbage-collection](<https://devfeed.tech/tags/garbage-collection.md>), [gc](<https://devfeed.tech/tags/gc.md>), [graph-theory](<https://devfeed.tech/tags/graph-theory.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [memory](<https://devfeed.tech/tags/memory.md>), [memory-management](<https://devfeed.tech/tags/memory-management.md>)

### AI overview

An exploration of Java heap dumps that explains shallow size, retained size, garbage-collection roots, and dominators. It also demonstrates using Shark and Graphviz to explore heap and view hierarchies.

### Source excerpt

Exploring heap dumps I have investigated many heap dumps over the years, and I usually switch back and forth between two tools: YourKit Java Profiler to poke around the heap and look for interesting things (ask your company to buy a license!) Shark...

## Testing LeakCanary 3 heap-growth detection with the Slack Android app

DevFeed: [Testing LeakCanary 3 heap-growth detection with the Slack Android app](<https://devfeed.tech/articles/cutting-some-slack-for-leaks-and-giggles-25621.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/cutting-some-slack-for-leaks-and-giggles>)

Author: Pierre-Yves Ricau

Published: 2024-05-07T00:47:25Z

Content type: tutorial

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [App](<https://devfeed.tech/topics/app.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Emulator](<https://devfeed.tech/topics/emulator.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [app](<https://devfeed.tech/tags/app.md>), [article](<https://devfeed.tech/tags/article.md>), [droidcon](<https://devfeed.tech/tags/droidcon.md>), [emulator](<https://devfeed.tech/tags/emulator.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [leakcanary](<https://devfeed.tech/tags/leakcanary.md>), [memory-leak](<https://devfeed.tech/tags/memory-leak.md>), [performance](<https://devfeed.tech/tags/performance.md>), [slack](<https://devfeed.tech/tags/slack.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

The article describes a preview LeakCanary 3 toolkit that detects heap growth by comparing repeated heap dumps and tracking objects with increasingly many outgoing edges. It explains how to run the tool against the Slack Android app using an emulator and UI Automator, but the supplied text ends before the results are presented.

### Source excerpt

In this article I run the new LeakCanary toolkit against the Slack Android app. Read on to learn a bunch! A new LeakCanary toolkit In two months, I will give a talk at Droidcon SF: Cutting Edges: universal heap trimming with LeakCanary 3 At Square, ...

## Replacing a Kotlin HashMap with Generated Code for Screen-Team Lookups

DevFeed: [Replacing a Kotlin HashMap with Generated Code for Screen-Team Lookups](<https://devfeed.tech/articles/a-weirder-hashmap-25617.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/a-weirder-hashmap>)

Author: Pierre-Yves Ricau

Published: 2024-02-15T03:59:18Z

Content type: tutorial

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [Programming](<https://devfeed.tech/topics/programming.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [make](<https://devfeed.tech/topics/make.md>), [Code](<https://devfeed.tech/topics/code.md>), [modules](<https://devfeed.tech/topics/modules.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [build-tool](<https://devfeed.tech/tags/build-tool.md>), [code](<https://devfeed.tech/tags/code.md>), [internals](<https://devfeed.tech/tags/internals.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-compiler](<https://devfeed.tech/tags/kotlin-compiler.md>), [memory](<https://devfeed.tech/tags/memory.md>), [modules](<https://devfeed.tech/tags/modules.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [performance](<https://devfeed.tech/tags/performance.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

The article explores replacing a Kotlin map of roughly 1,000 screen classes and owner teams with generated code. It estimates the map's retained size at about 120 KB and considers a hash-based, code-generated lookup to reduce that memory use.

### Source excerpt

Today I was mob programming with Square's Mobile & Performance Reliability team and we toyed with an interesting idea. Our codebase has classes that represent screens a user can navigate to. These classes are defined in modules, and these modules hav...

## DIY: your own Dependency Injection library!

DevFeed: [DIY: your own Dependency Injection library!](<https://devfeed.tech/articles/diy-your-own-dependency-injection-library-25622.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/diy-your-own-dependency-injection-library>)

Author: Pierre-Yves Ricau

Published: 2024-01-18T20:08:04Z

Content type: tutorial

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Library](<https://devfeed.tech/topics/library.md>), [Code](<https://devfeed.tech/topics/code.md>), [Graphs](<https://devfeed.tech/topics/graphs.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [code](<https://devfeed.tech/tags/code.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dagger-hilt](<https://devfeed.tech/tags/dagger-hilt.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [graph](<https://devfeed.tech/tags/graph.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [internals](<https://devfeed.tech/tags/internals.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [library](<https://devfeed.tech/tags/library.md>)

### AI overview

This tutorial explains dependency injection by progressively building a simple library, moving from manual dependency injection toward simplified versions of Google Guice, Dagger 1, and Dagger 2. It uses Kotlin and discusses dependency graphs, object graphs, factories, modules, and APIs.

### Source excerpt

Dependency Injection libraries are powerful tools, but they're often also intimidating & confusing. When that happens to me, I find that understanding how a tool works helps me get over the initial scare of the dark magic internals. In this article, ...

## ANR internals: touch dispatching through the view hierarchy

DevFeed: [ANR internals: touch dispatching through the view hierarchy](<https://devfeed.tech/articles/anr-internals-touch-dispatching-through-the-view-hierarchy-25618.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/anr-internals-touch-dispatching-through-the-view-hierarchy>)

Author: Pierre-Yves Ricau

Published: 2023-09-14T16:32:24Z

Content type: tutorial

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [ui](<https://devfeed.tech/topics/ui.md>), [Compose](<https://devfeed.tech/topics/compose.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [anr](<https://devfeed.tech/tags/anr.md>), [compose](<https://devfeed.tech/tags/compose.md>), [deep-dive](<https://devfeed.tech/tags/deep-dive.md>), [internals](<https://devfeed.tech/tags/internals.md>), [main-thread](<https://devfeed.tech/tags/main-thread.md>), [performance](<https://devfeed.tech/tags/performance.md>), [thread](<https://devfeed.tech/tags/thread.md>)

### AI overview

This first article in a series on Android ANR internals examines how touch and input events move through the view hierarchy. It explains that input dispatching can trigger an ANR when an app does not respond within five seconds, and compares traditional view listener dispatch with Compose click-lambda dispatch.

### Source excerpt

I'm writing a blog series on ANR internals, where I'll use ANRs as an excuse to learn more about how various parts of Android work. This first article is focused on touch dispatching through the view hierarchy. ANR triggers How is an "Application No...

## A script to compare two Macrobenchmarks runs

DevFeed: [A script to compare two Macrobenchmarks runs](<https://devfeed.tech/articles/a-script-to-compare-two-macrobenchmarks-runs-25616.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/a-script-to-compare-two-macrobenchmarks-runs>)

Author: Pierre-Yves Ricau

Published: 2023-09-07T16:36:32Z

Content type: tutorial

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Jetpack](<https://devfeed.tech/topics/jetpack.md>), [Script](<https://devfeed.tech/topics/script.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [article](<https://devfeed.tech/tags/article.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [developers](<https://devfeed.tech/tags/developers.md>), [download](<https://devfeed.tech/tags/download.md>), [improvements](<https://devfeed.tech/tags/improvements.md>), [install](<https://devfeed.tech/tags/install.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [performance](<https://devfeed.tech/tags/performance.md>), [run](<https://devfeed.tech/tags/run.md>), [script](<https://devfeed.tech/tags/script.md>)

### AI overview

This article presents a Kotlin script for comparing the results of two Jetpack Macrobenchmark runs. It builds on a methodology using normalized distributions and confidence intervals, and explains how to install, download, make executable, and run the script.

### Source excerpt

In Statistically Rigorous Android Macrobenchmarks, I laid out a methodology for rigorously comparing the outcome of two Jetpack Macrobenchmark runs. To summarize the article: Remove sources of variations until the distribution fits a normal distribu...

## How Android Memory Leaks Cause Jank, Freezes, and ANRs

DevFeed: [How Android Memory Leaks Cause Jank, Freezes, and ANRs](<https://devfeed.tech/articles/freezes-anrs-check-memory-leaks-25624.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/freezes-anrs-check-memory-leaks>)

Author: Pierre-Yves Ricau

Published: 2023-07-20T22:09:53Z

Content type: tutorial

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Memory Leaks](<https://devfeed.tech/topics/memory-leaks.md>), [Latency](<https://devfeed.tech/topics/latency.md>), [navigation](<https://devfeed.tech/topics/navigation.md>), [Java](<https://devfeed.tech/topics/java.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [jank](<https://devfeed.tech/tags/jank.md>), [latency](<https://devfeed.tech/tags/latency.md>), [main-thread](<https://devfeed.tech/tags/main-thread.md>), [memory-leak](<https://devfeed.tech/tags/memory-leak.md>), [memory-leaks](<https://devfeed.tech/tags/memory-leaks.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [outofmemory](<https://devfeed.tech/tags/outofmemory.md>), [performance](<https://devfeed.tech/tags/performance.md>)

### AI overview

This article explains how Android memory leaks can cause jank, freezes, and ANRs rather than immediate crashes. It describes tracking memory usage per navigation, correlating memory growth with navigation latency, and how garbage collection blocking the main thread affects UI responsiveness near the app memory limit.

### Source excerpt

In this article, I show how Android memory leaks lead to jank, freezes and ANRs more often than they lead to OutOfMemoryError crashes. Navigation Latency At Square, we've been tracking a User-Centric performance metric: Interaction Latency. We track ...

## Tracking Android App Launch in production

DevFeed: [Tracking Android App Launch in production](<https://devfeed.tech/articles/tracking-android-app-launch-in-production-25632.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/tracking-android-app-launch-in-production>)

Author: Pierre-Yves Ricau

Published: 2023-07-13T00:57:36Z

Content type: tutorial

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [App](<https://devfeed.tech/topics/app.md>), [dashboards](<https://devfeed.tech/topics/dashboards.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>)

Tags: [analytics](<https://devfeed.tech/tags/analytics.md>), [android](<https://devfeed.tech/tags/android.md>), [app](<https://devfeed.tech/tags/app.md>), [article](<https://devfeed.tech/tags/article.md>), [dashboards](<https://devfeed.tech/tags/dashboards.md>), [metrics](<https://devfeed.tech/tags/metrics.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [performance](<https://devfeed.tech/tags/performance.md>)

### AI overview

The article argues that Android app-launch monitoring should focus primarily on the user's launch scenario and expected responsiveness, rather than only classifying launches as cold, warm, or hot. It recommends scenario-specific dashboards and investigating issues such as crashes or high memory usage when launches from Recents are unexpectedly cold.

### Source excerpt

👋 In this article, I summarize my findings on Android app launch after a few years of deep dives, with the hope that these guidelines help implementations track app launches correctly. User-Centric App Launch analytics In User-Centric Mobile Perfor...

## User-Centric Mobile Performance

DevFeed: [User-Centric Mobile Performance](<https://devfeed.tech/articles/user-centric-mobile-performance-25633.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/user-centric-mobile-performance>)

Author: Pierre-Yves Ricau

Published: 2023-07-06T20:15:44Z

Content type: article

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [User Experience](<https://devfeed.tech/topics/user-experience.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [benchmarking](<https://devfeed.tech/topics/benchmarking.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [app-performance](<https://devfeed.tech/tags/app-performance.md>), [article](<https://devfeed.tech/tags/article.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [customer-experience](<https://devfeed.tech/tags/customer-experience.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [metrics](<https://devfeed.tech/tags/metrics.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [performance](<https://devfeed.tech/tags/performance.md>), [performance-metrics](<https://devfeed.tech/tags/performance-metrics.md>), [user-experience](<https://devfeed.tech/tags/user-experience.md>)

### AI overview

An approach to mobile performance that prioritizes user-centric metrics over technical resource and workload metrics. It distinguishes smoothness and responsiveness measures while treating CPU, memory, database, and similar technical metrics as secondary diagnostic signals.

### Source excerpt

👋 Hi, this is P-Y, over the last three years I've been steering Square's focus on mobile performance and building a framework for thinking about it and prioritizing work. In this article I share my approach, let me know what you think! Useful metri...

## Avoid Java double brace initialization

DevFeed: [Avoid Java double brace initialization](<https://devfeed.tech/articles/avoid-java-double-brace-initialization-25619.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/avoid-java-double-brace-initialization>)

Author: Pierre-Yves Ricau

Published: 2023-06-27T20:58:00Z

Content type: tutorial

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Code](<https://devfeed.tech/topics/code.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [class](<https://devfeed.tech/tags/class.md>), [classes](<https://devfeed.tech/tags/classes.md>), [code](<https://devfeed.tech/tags/code.md>), [constructor](<https://devfeed.tech/tags/constructor.md>), [crash-reporting](<https://devfeed.tech/tags/crash-reporting.md>), [gc](<https://devfeed.tech/tags/gc.md>), [global](<https://devfeed.tech/tags/global.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [java](<https://devfeed.tech/tags/java.md>), [leak](<https://devfeed.tech/tags/leak.md>), [leakcanary](<https://devfeed.tech/tags/leakcanary.md>), [lifecycle](<https://devfeed.tech/tags/lifecycle.md>), [memory](<https://devfeed.tech/tags/memory.md>), [memory-leak](<https://devfeed.tech/tags/memory-leak.md>), [object](<https://devfeed.tech/tags/object.md>), [patterns](<https://devfeed.tech/tags/patterns.md>), [subclass](<https://devfeed.tech/tags/subclass.md>)

### AI overview

This tutorial explains how Java double brace initialization can cause memory leaks. An anonymous HashMap subclass implicitly retains its outer Activity, so a breadcrumb stored by a singleton BugSnag client can keep a destroyed Android Activity in memory. The article recommends avoiding the pattern and using explicit initialization or Kotlin.

### Source excerpt

TL;DR Avoid doing this: new HashMap() {{ put("key", value); }}; Leak Trace I was recently looking at the following leak trace from LeakCanary: ┬─── │ GC Root: Global variable in native code │ ├─ com.bugsnag.android.AnrPlugin instan...

## Statistically Rigorous Android Macrobenchmarks

DevFeed: [Statistically Rigorous Android Macrobenchmarks](<https://devfeed.tech/articles/statistically-rigorous-android-macrobenchmarks-25630.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/statistically-rigorous-android-macrobenchmarks>)

Author: Pierre-Yves Ricau

Published: 2023-05-01T20:57:41Z

Content type: tutorial

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Benchmark](<https://devfeed.tech/topics/benchmark.md>), [Statistics](<https://devfeed.tech/topics/statistics.md>), [Jetpack](<https://devfeed.tech/topics/jetpack.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [macrobenchmark](<https://devfeed.tech/tags/macrobenchmark.md>), [performance](<https://devfeed.tech/tags/performance.md>), [statistics](<https://devfeed.tech/tags/statistics.md>)

### AI overview

This article explains how to analyze Jetpack Macrobenchmark results when evaluating Android software changes. It uses statistics fundamentals and research on Java performance evaluation to recommend comparing benchmark distributions rather than relying on aggregate values such as the minimum, maximum, mean, or median.

### Source excerpt

👋 Hi, this is P.Y., I work as an Android Engineer at Block. As we started evaluating the performance impact of software changes, I brushed up on my statistics classes, talked to industry peers, read several papers, wrote an internal doc to help us i...

## Callback leaks: cancel your Picasso requests!

DevFeed: [Callback leaks: cancel your Picasso requests!](<https://devfeed.tech/articles/callback-leaks-cancel-your-picasso-requests-25620.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/callback-leaks-cancel-your-picasso-requests>)

Author: Pierre-Yves Ricau

Published: 2023-01-17T21:06:14Z

Content type: tutorial

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [Picasso](<https://devfeed.tech/topics/picasso.md>), [Android](<https://devfeed.tech/topics/android.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [leak](<https://devfeed.tech/tags/leak.md>), [leakcanary](<https://devfeed.tech/tags/leakcanary.md>), [memory-leak](<https://devfeed.tech/tags/memory-leak.md>), [performance](<https://devfeed.tech/tags/performance.md>), [picasso](<https://devfeed.tech/tags/picasso.md>)

### AI overview

This article investigates an Android memory leak caused by an in-flight Picasso image-loading request retaining a detached UI component through a custom callback. It explains how to read the leak trace and recommends canceling requests or using tags when the UI goes away.

### Source excerpt

👋 Hi, this is P.Y., I work as an Android Engineer at Block. Every month I organize an internal Ensemble Leak Hunting session where we look at the top leaks reported by LeakCanary to learn how to read

## Investigation of a Gradle and IntelliJ IDEA Memory Leak

DevFeed: [Investigation of a Gradle and IntelliJ IDEA Memory Leak](<https://devfeed.tech/articles/let-s-investigate-a-gradle-intellij-memory-leak-25625.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/gradle-intellij-memory-leak>)

Author: Pierre-Yves Ricau

Published: 2022-10-12T17:26:46Z

Content type: tutorial

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [Gradle](<https://devfeed.tech/topics/gradle.md>), [Memory Leaks](<https://devfeed.tech/topics/memory-leaks.md>), [IntelliJ IDEA](<https://devfeed.tech/topics/intellij-idea.md>), [Java](<https://devfeed.tech/topics/java.md>), [Graphs](<https://devfeed.tech/topics/graphs.md>)

Tags: [garbage-collection](<https://devfeed.tech/tags/garbage-collection.md>), [gc](<https://devfeed.tech/tags/gc.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [graph](<https://devfeed.tech/tags/graph.md>), [idea](<https://devfeed.tech/tags/idea.md>), [intellij](<https://devfeed.tech/tags/intellij.md>), [java](<https://devfeed.tech/tags/java.md>), [leak](<https://devfeed.tech/tags/leak.md>), [memory](<https://devfeed.tech/tags/memory.md>), [memory-leak](<https://devfeed.tech/tags/memory-leak.md>), [performance](<https://devfeed.tech/tags/performance.md>)

### AI overview

A team investigation examines a Gradle process memory leak during project import in IntelliJ IDEA. The article describes heap analysis using dominator trees, pending finalization, and paths from GC roots.

### Source excerpt

👋 Hi, this is P.Y., I work as an Android Engineer at Block. This article shares a team investigation by Tony Robalik, Pablo Baxter, Roger Hu and myself into a recent Gradle / IntelliJ memory leak. O

## Using an Activity from a Hilt ViewModel

DevFeed: [Using an Activity from a Hilt ViewModel](<https://devfeed.tech/articles/using-an-activity-from-a-hilt-viewmodel-25634.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/using-an-activity-from-a-hilt-viewmodel>)

Author: Pierre-Yves Ricau

Published: 2022-09-07T21:59:49Z

Content type: tutorial

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [blog](<https://devfeed.tech/tags/blog.md>), [code](<https://devfeed.tech/tags/code.md>), [component](<https://devfeed.tech/tags/component.md>), [dagger-hilt](<https://devfeed.tech/tags/dagger-hilt.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [lifecycle](<https://devfeed.tech/tags/lifecycle.md>), [state](<https://devfeed.tech/tags/state.md>), [view](<https://devfeed.tech/tags/view.md>), [viewmodel](<https://devfeed.tech/tags/viewmodel.md>)

### AI overview

This tutorial presents a Hilt-based technique for accessing the current Android Activity from a Hilt ViewModel. It uses scoped activity storage, an activity-scoped entry point, and lifecycle callbacks to update the reference while accounting for configuration changes and multiple activities.

### Source excerpt

👋 Hi, this is P.Y., I work as an Android Engineer at Block. This blog shares a bit of hackery to be able to access an activity instance within a Hilt ViewModel. If you come up with other interesting

## WhileSubscribed(5000)

DevFeed: [WhileSubscribed(5000)](<https://devfeed.tech/articles/whilesubscribed-5000-25635.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/whilesubscribed5000>)

Author: Pierre-Yves Ricau

Published: 2022-08-30T23:01:56Z

Content type: tutorial

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [Android](<https://devfeed.tech/topics/android.md>), [now-in-android](<https://devfeed.tech/topics/now-in-android.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [compose](<https://devfeed.tech/tags/compose.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [now-in-android](<https://devfeed.tech/tags/now-in-android.md>), [stream](<https://devfeed.tech/tags/stream.md>)

### AI overview

An Android engineer examines the 5,000-millisecond WhileSubscribed timeout in Kotlin flow state sharing, explaining how it affects upstream work during configuration changes and considering alternatives such as sharing without a timeout or using Eagerly.

### Source excerpt

👋 Hi, this is P.Y., I work as an Android Engineer at Block. I know nothing about Compose so please let me know if I messed up on Twitter! I've been hacking on a new LeakCanary standalone app to visua

## Investigating Slow Android CI Heap Analysis on API 23 Emulators

DevFeed: [Investigating Slow Android CI Heap Analysis on API 23 Emulators](<https://devfeed.tech/articles/of-sharks-and-heaps-of-sticky-marshmallows-25627.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/of-sharks-and-heaps-of-sticky-marshmallows>)

Author: Pierre-Yves Ricau

Published: 2022-04-07T19:57:56Z

Content type: article

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [test](<https://devfeed.tech/topics/test.md>)

Tags: [analysis](<https://devfeed.tech/tags/analysis.md>), [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [ci](<https://devfeed.tech/tags/ci.md>), [deep-dive](<https://devfeed.tech/tags/deep-dive.md>), [leakcanary](<https://devfeed.tech/tags/leakcanary.md>), [memory](<https://devfeed.tech/tags/memory.md>), [perfetto](<https://devfeed.tech/tags/perfetto.md>), [performance](<https://devfeed.tech/tags/performance.md>), [trace](<https://devfeed.tech/tags/trace.md>)

### AI overview

This deep-dive investigates why Android CI heap analysis occasionally took several minutes on API 23 emulators. The author reproduces the issue locally, uses tracing and heap dumps, and examines unexpectedly numerous sticky-class GC roots in Shark, LeakCanary's heap dump parser.

### Source excerpt

👋 Hi, this is P.Y., I work as an Android Engineer at Block, the rockey company formerly known as Square. I spend a lot of time focusing on performance and try to share my experience with deep-dive bl

## Tracing main thread messages

DevFeed: [Tracing main thread messages](<https://devfeed.tech/articles/tracing-main-thread-messages-25631.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/tracing-main-thread-messages>)

Author: Pierre-Yves Ricau

Published: 2022-01-27T19:53:56Z

Content type: tutorial

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [tracing](<https://devfeed.tech/topics/tracing.md>), [Android](<https://devfeed.tech/topics/android.md>), [Logging](<https://devfeed.tech/topics/logging.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [logger](<https://devfeed.tech/tags/logger.md>), [main-thread](<https://devfeed.tech/tags/main-thread.md>), [perfetto](<https://devfeed.tech/tags/perfetto.md>), [performance](<https://devfeed.tech/tags/performance.md>), [tracing](<https://devfeed.tech/tags/tracing.md>)

### AI overview

This tutorial explains how to inspect Android main-thread activity in Perfetto traces. It uses the seldom-used Looper.setMessageLogging() API to log message dispatches and adds trace sections for each main-thread message with the AndroidX tracing library.

### Source excerpt

👋 Hi, this is P.Y., I work as an Android Engineer at Block, the non-fungible company formerly known as Square. I spend a lot of time focusing on performance and try to share my experience with deep-d

## Fixing simpleperf broken records

DevFeed: [Fixing simpleperf broken records](<https://devfeed.tech/articles/fixing-simpleperf-broken-records-25623.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/fixing-simpleperf-broken-records>)

Author: Pierre-Yves Ricau

Published: 2022-01-21T18:13:19Z

Content type: tutorial

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Android Studio](<https://devfeed.tech/topics/android-studio.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [code](<https://devfeed.tech/tags/code.md>), [developer](<https://devfeed.tech/tags/developer.md>), [performance](<https://devfeed.tech/tags/performance.md>), [profiling](<https://devfeed.tech/tags/profiling.md>)

### AI overview

This tutorial explains how to diagnose and work around unusable simpleperf traces on Android when truncated callchain roots create breaks in the main-thread call tree. It also describes simpleperf's relationship to Android Studio's callstack sampling features.

### Source excerpt

Summary This blog shows how to fix simpleperf traces which are otherwise unusable because they include samples with truncated callchain roots. Read on to learn more about what these crazy words mean! Profiling Android apps As an Android developer, I ...