# 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: article

Language: en

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

Topics: [Developer experience](<https://devfeed.tech/topics/developer-experience.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>), [Back end](<https://devfeed.tech/topics/backend.md>)

Tags: [2013](<https://devfeed.tech/tags/2013.md>), [2021](<https://devfeed.tech/tags/2021.md>), [ai](<https://devfeed.tech/tags/ai.md>), [backend](<https://devfeed.tech/tags/backend.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [focus](<https://devfeed.tech/tags/focus.md>), [foundation](<https://devfeed.tech/tags/foundation.md>), [france](<https://devfeed.tech/tags/france.md>), [leakcanary](<https://devfeed.tech/tags/leakcanary.md>), [meetings](<https://devfeed.tech/tags/meetings.md>), [moving](<https://devfeed.tech/tags/moving.md>), [remote](<https://devfeed.tech/tags/remote.md>), [san-francisco](<https://devfeed.tech/tags/san-francisco.md>), [software](<https://devfeed.tech/tags/software.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>), [square](<https://devfeed.tech/tags/square.md>), [timezone](<https://devfeed.tech/tags/timezone.md>)

### AI overview

After moving from San Francisco to France, the author stayed at Square following a year of administrative and legal work; an earlier idea to move LeakCanary to an open source foundation was never carried out. The six-hour difference with New York and nine-hour difference with San Francisco makes meeting overlap the main challenge. The author keeps regular office hours and offers two evening meeting windows each week, while gaining longer uninterrupted work stretches. They say AI now helps them work autonomously at the edge of Square's systems and unblock themselves without waiting for colleagues to come online. The supplied excerpt ends mid-sentence, so it does not establish the full account of how AI affects the work.

### 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: article

Language: en

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

Topics: [SQLite](<https://devfeed.tech/topics/sqlite.md>), [Parallelism](<https://devfeed.tech/topics/parallelism.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [application](<https://devfeed.tech/tags/application.md>), [blocking](<https://devfeed.tech/tags/blocking.md>), [connection-pool](<https://devfeed.tech/tags/connection-pool.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [database](<https://devfeed.tech/tags/database.md>), [dispatcher](<https://devfeed.tech/tags/dispatcher.md>), [documentation](<https://devfeed.tech/tags/documentation.md>), [internals](<https://devfeed.tech/tags/internals.md>), [io](<https://devfeed.tech/tags/io.md>), [kdoc](<https://devfeed.tech/tags/kdoc.md>), [lock](<https://devfeed.tech/tags/lock.md>), [parallel](<https://devfeed.tech/tags/parallel.md>), [parallelism](<https://devfeed.tech/tags/parallelism.md>), [performance](<https://devfeed.tech/tags/performance.md>), [point-of-sale](<https://devfeed.tech/tags/point-of-sale.md>), [pool](<https://devfeed.tech/tags/pool.md>), [queries](<https://devfeed.tech/tags/queries.md>), [query](<https://devfeed.tech/tags/query.md>), [sqldelight](<https://devfeed.tech/tags/sqldelight.md>), [sqlite](<https://devfeed.tech/tags/sqlite.md>), [square](<https://devfeed.tech/tags/square.md>)

### AI overview

Android SQLite may allow only one connection per database, so parallel queries against the same database can occupy multiple coroutine threads while waiting on that connection. The excerpt warns that enough blocked queries can consume most of the IO dispatcher's 64 threads and delay unrelated IO work. It describes the practical approach of using a distinct dispatcher instance for each database, drawing on the elasticity of limited-parallelism dispatcher views. The excerpt ends mid-explanation, so it does not provide the complete configuration or implementation.

### 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: article

Language: en

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

Topics: [Java](<https://devfeed.tech/topics/java.md>), [JDK Flight Recorder](<https://devfeed.tech/topics/jdk-flight-recorder.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [computer-science](<https://devfeed.tech/tags/computer-science.md>), [dump](<https://devfeed.tech/tags/dump.md>), [graph-theory](<https://devfeed.tech/tags/graph-theory.md>), [heap](<https://devfeed.tech/tags/heap.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>), [rendering](<https://devfeed.tech/tags/rendering.md>)

### AI overview

The author uses YourKit Java Profiler to explore heap dumps and Shark for more complex aggregation queries. A Kotlin script using Shark can locate activity instances, traverse view and view-array references with breadth-first traversal, and render a view hierarchy through Graphviz. For memory analysis, the excerpt distinguishes shallow size (memory occupied by an object itself) from retained size (memory reclaimable when the object and objects retained only through it are garbage-collected). It introduces reachability from references and GC roots as context for discussing dominators, but the excerpt ends before explaining dominators or presenting the treemap.

### 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...

## Cutting some Slack, for leaks and giggles

DevFeed: [Cutting some Slack, for leaks and giggles](<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: article

Language: en

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

Topics: [leakcanary](<https://devfeed.tech/topics/leakcanary.md>), [UiAutomator](<https://devfeed.tech/topics/uiautomator.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [emulator](<https://devfeed.tech/tags/emulator.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [growth](<https://devfeed.tech/tags/growth.md>), [heap](<https://devfeed.tech/tags/heap.md>), [leakcanary](<https://devfeed.tech/tags/leakcanary.md>), [leaks](<https://devfeed.tech/tags/leaks.md>), [maestro](<https://devfeed.tech/tags/maestro.md>), [memory](<https://devfeed.tech/tags/memory.md>), [memory-leak](<https://devfeed.tech/tags/memory-leak.md>), [performance](<https://devfeed.tech/tags/performance.md>), [slack](<https://devfeed.tech/tags/slack.md>)

### AI overview

LeakCanary 3.0 alpha 4 adds a heap-growth detector for cases where memory use keeps rising without a reported leak, such as a collection that continually accumulates log strings. It compares repeated heap dumps and looks for objects whose outgoing edges keep increasing. The author runs it as a UI Automator test that switches between Slack Android workspaces. On normal Android OS builds, dumping another app's heap requires that app to be debuggable or profileable as shell; the author says those restrictions do not apply on non-Play-Store emulator images. The excerpt ends before reporting the experiment's findings.

### 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>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [api](<https://devfeed.tech/tags/api.md>), [build](<https://devfeed.tech/tags/build.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [dag](<https://devfeed.tech/tags/dag.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dagger-2](<https://devfeed.tech/tags/dagger-2.md>), [dagger-hilt](<https://devfeed.tech/tags/dagger-hilt.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [dependency-graph](<https://devfeed.tech/tags/dependency-graph.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [di](<https://devfeed.tech/tags/di.md>), [diy](<https://devfeed.tech/tags/diy.md>), [extension-function](<https://devfeed.tech/tags/extension-function.md>), [factory](<https://devfeed.tech/tags/factory.md>), [implement](<https://devfeed.tech/tags/implement.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>), [map](<https://devfeed.tech/tags/map.md>), [module](<https://devfeed.tech/tags/module.md>)

### AI overview

The article builds intuition for dependency injection by progressing from manual construction to simplified versions of Google Guice, Dagger 1, and Dagger 2. Manual injection creates dependencies in order at a dedicated configuration point, but becomes difficult as collaborators grow. The excerpt defines an ObjectGraph as the entry point that supplies requested instances, a Factory as the creator of a type using dependencies from the graph, and a Module as the provider of factories for particular types. The article frames a dependency graph as a DAG and provides Kotlin examples; the supplied text ends while introducing Module, so later implementation details are not available here.

### 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: article

Language: en

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

Topics: [input](<https://devfeed.tech/topics/input.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [scheduling](<https://devfeed.tech/topics/scheduling.md>), [animations](<https://devfeed.tech/topics/animations.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>), [hierarchy](<https://devfeed.tech/tags/hierarchy.md>), [performance](<https://devfeed.tech/tags/performance.md>), [view](<https://devfeed.tech/tags/view.md>)

### AI overview

The excerpt explains how Android input-dispatch ANRs relate to touch handling: the system can report an ANR when an app fails to respond to an input event such as a tap within five seconds. A touch enters through native code and passes through delegates before reaching the view hierarchy. In Compose, it continues through Compose nodes to the click lambda. The excerpt contrasts timing: the view framework posts listener invocation to the main-thread queue, while Compose invokes its lambda immediately on the main thread. It suggests posting can let the render thread begin a button ripple before slow tap handling blocks the main thread, but the excerpt cuts off before completing that point.

### 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: [Macrobenchmark](<https://devfeed.tech/topics/macrobenchmark.md>), [Jetpack](<https://devfeed.tech/topics/jetpack.md>), [A/B Testing](<https://devfeed.tech/topics/a-b-testing.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [compare](<https://devfeed.tech/tags/compare.md>), [comparison](<https://devfeed.tech/tags/comparison.md>), [compute](<https://devfeed.tech/tags/compute.md>), [confidence](<https://devfeed.tech/tags/confidence.md>), [confidence-interval](<https://devfeed.tech/tags/confidence-interval.md>), [developers](<https://devfeed.tech/tags/developers.md>), [distribution](<https://devfeed.tech/tags/distribution.md>), [download](<https://devfeed.tech/tags/download.md>), [feedback](<https://devfeed.tech/tags/feedback.md>), [github](<https://devfeed.tech/tags/github.md>), [google](<https://devfeed.tech/tags/google.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [macrobenchmark](<https://devfeed.tech/tags/macrobenchmark.md>), [methodology](<https://devfeed.tech/tags/methodology.md>), [performance](<https://devfeed.tech/tags/performance.md>), [run](<https://devfeed.tech/tags/run.md>), [script](<https://devfeed.tech/tags/script.md>), [spreadsheet](<https://devfeed.tech/tags/spreadsheet.md>)

### AI overview

The Kotlin script helps compare two Jetpack Macrobenchmark runs by applying the article's method: reduce variation until measurements fit a normal distribution with stable standard deviation, then calculate a confidence interval for the difference between means. To use it, install Kotlin, download the script, make it executable, and run it. The author offers it as is, with no guarantees or plans to maintain it.

### 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: article

Language: en

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

Topics: [app startup](<https://devfeed.tech/topics/app-startup.md>), [mobile-app-performance](<https://devfeed.tech/topics/mobile-app-performance.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [analytics](<https://devfeed.tech/tags/analytics.md>), [android](<https://devfeed.tech/tags/android.md>), [app](<https://devfeed.tech/tags/app.md>), [cases](<https://devfeed.tech/tags/cases.md>), [crash](<https://devfeed.tech/tags/crash.md>), [dashboards](<https://devfeed.tech/tags/dashboards.md>), [launch](<https://devfeed.tech/tags/launch.md>), [launches](<https://devfeed.tech/tags/launches.md>), [metric](<https://devfeed.tech/tags/metric.md>), [metrics](<https://devfeed.tech/tags/metrics.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [mobile-app](<https://devfeed.tech/tags/mobile-app.md>), [mobile-performance](<https://devfeed.tech/tags/mobile-performance.md>), [notification](<https://devfeed.tech/tags/notification.md>), [notifications](<https://devfeed.tech/tags/notifications.md>), [os](<https://devfeed.tech/tags/os.md>), [performance](<https://devfeed.tech/tags/performance.md>), [performance-metrics](<https://devfeed.tech/tags/performance-metrics.md>), [tracking](<https://devfeed.tech/tags/tracking.md>), [user](<https://devfeed.tech/tags/user.md>)

### AI overview

For production Android launch analytics, prioritize how users enter the app and set responsiveness targets for each scenario; cold, warm, and hot launch labels are useful supporting metrics. Launcher-icon launches may take a few seconds, recent notification launches should be fast, launches from another app should be fairly fast, and returns from Recents should feel almost instant. The excerpt says the first three scenarios can be identified from the launched activity's intent, while a saved instance state can identify a return from Recents. If Recents launches dominate, optimize that path; if many are cold, investigate why the app is being killed, such as crashes or high memory use.

### 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: [mobile-app-performance](<https://devfeed.tech/topics/mobile-app-performance.md>), [Benchmark](<https://devfeed.tech/topics/benchmark.md>), [software-development](<https://devfeed.tech/topics/software-development.md>), [performance-optimization](<https://devfeed.tech/topics/performance-optimization.md>), [Business, Industry, Usability, User Experience, User Research, Web Strategy](<https://devfeed.tech/topics/business-industry-usability-user-experience-user-research-web-strategy.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [app](<https://devfeed.tech/tags/app.md>), [app-performance](<https://devfeed.tech/tags/app-performance.md>), [backend](<https://devfeed.tech/tags/backend.md>), [better](<https://devfeed.tech/tags/better.md>), [business](<https://devfeed.tech/tags/business.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [cpus](<https://devfeed.tech/tags/cpus.md>), [customer](<https://devfeed.tech/tags/customer.md>), [customer-experience](<https://devfeed.tech/tags/customer-experience.md>), [experience](<https://devfeed.tech/tags/experience.md>), [export](<https://devfeed.tech/tags/export.md>), [faster](<https://devfeed.tech/tags/faster.md>), [framework](<https://devfeed.tech/tags/framework.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [memory](<https://devfeed.tech/tags/memory.md>), [metric](<https://devfeed.tech/tags/metric.md>), [metrics](<https://devfeed.tech/tags/metrics.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [mobile-performance](<https://devfeed.tech/tags/mobile-performance.md>), [performance](<https://devfeed.tech/tags/performance.md>), [user](<https://devfeed.tech/tags/user.md>), [user-experience](<https://devfeed.tech/tags/user-experience.md>)

### AI overview

The excerpt argues that mobile teams should prioritize performance metrics tied to customer experience, using CPU, memory, and workload durations as secondary diagnostics. It distinguishes smoothness metrics, which track perceived jank in on-screen motion, from responsiveness metrics, which track delays in user interactions. Technical resource use alone can misrepresent experience: during video export, for example, high CPU and GPU use may help the task finish faster. The excerpt does not include the detailed framework or definitions beyond these categories.

### 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: article

Language: en

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

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

Tags: [android](<https://devfeed.tech/tags/android.md>), [hashmap](<https://devfeed.tech/tags/hashmap.md>), [java](<https://devfeed.tech/tags/java.md>), [leak](<https://devfeed.tech/tags/leak.md>), [memory-leak](<https://devfeed.tech/tags/memory-leak.md>), [patterns](<https://devfeed.tech/tags/patterns.md>)

### AI overview

A BugSnag breadcrumb's metadata map kept a destroyed Activity in memory because it was created with Java double brace initialization. That pattern makes an anonymous HashMap subclass whose implicit reference to its enclosing Activity survives through the breadcrumb. The excerpt recommends avoiding the pattern and initializing the map directly, using a helper for cleaner code, or converting the file to Kotlin. The leak trace also distinguishes the intentionally long-lived BugSnag singleton and breadcrumb ring buffer from the unexpectedly retained Activity.

### 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: article

Language: en

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

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

Tags: [android](<https://devfeed.tech/tags/android.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [block](<https://devfeed.tech/tags/block.md>), [ci](<https://devfeed.tech/tags/ci.md>), [evaluation](<https://devfeed.tech/tags/evaluation.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [latency](<https://devfeed.tech/tags/latency.md>), [macrobenchmark](<https://devfeed.tech/tags/macrobenchmark.md>), [performance](<https://devfeed.tech/tags/performance.md>), [performance-evaluation](<https://devfeed.tech/tags/performance-evaluation.md>), [statistics](<https://devfeed.tech/tags/statistics.md>)

### AI overview

The excerpt argues that Jetpack Macrobenchmark results should be analyzed statistically when comparing software changes: comparing a single aggregate such as the minimum, median, maximum, or mean can mislead, and small differences or run-to-run variation make results hard to trust. The author describes tracing Android UI interactions with Trace.beginAsyncSection and measuring durations with TraceSectionMetric, then frames the need for a scientifically sound way to interpret comparisons. Building that analysis infrastructure takes substantial work; the author says a vendor solution may be preferable and reports that Emerge Tools follows a similar approach. The excerpt ends before detailing the proposed analysis method.

### 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: article

Language: en

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

Topics: [Picasso](<https://devfeed.tech/topics/picasso.md>), [leakcanary](<https://devfeed.tech/topics/leakcanary.md>), [callback](<https://devfeed.tech/topics/callback.md>)

Tags: [actions](<https://devfeed.tech/tags/actions.md>), [adapter](<https://devfeed.tech/tags/adapter.md>), [also](<https://devfeed.tech/tags/also.md>), [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [android-engineer](<https://devfeed.tech/tags/android-engineer.md>), [article](<https://devfeed.tech/tags/article.md>), [block](<https://devfeed.tech/tags/block.md>), [callback](<https://devfeed.tech/tags/callback.md>), [engineer](<https://devfeed.tech/tags/engineer.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [i](<https://devfeed.tech/tags/i.md>), [leak](<https://devfeed.tech/tags/leak.md>), [leakcanary](<https://devfeed.tech/tags/leakcanary.md>), [leaks](<https://devfeed.tech/tags/leaks.md>), [learn](<https://devfeed.tech/tags/learn.md>), [look](<https://devfeed.tech/tags/look.md>), [memory-leak](<https://devfeed.tech/tags/memory-leak.md>), [performance](<https://devfeed.tech/tags/performance.md>), [picasso](<https://devfeed.tech/tags/picasso.md>), [this](<https://devfeed.tech/tags/this.md>), [top](<https://devfeed.tech/tags/top.md>), [work](<https://devfeed.tech/tags/work.md>)

### AI overview

A Picasso request can keep a detached UI component from being garbage collected when its custom callback captures the component and the request remains in flight. Picasso's singleton holds weak references to target views but strong references to actions; the action and callback can therefore retain the detached view. Cancel requests when the UI goes away to prevent the leak and avoid continued resource use while loading. The excerpt also says Picasso automatically cancels a previous request when a new image is loaded into the same ImageView, which helps with recycled adapter views. It cuts off during that explanation, so it does not establish the full set of circumstances in which leaks are avoided.

### 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: [dagger-hilt](<https://devfeed.tech/topics/dagger-hilt.md>), [software-development](<https://devfeed.tech/topics/software-development.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [dagger-hilt](<https://devfeed.tech/tags/dagger-hilt.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [hilt](<https://devfeed.tech/tags/hilt.md>), [viewmodel](<https://devfeed.tech/tags/viewmodel.md>)

### AI overview

The excerpt presents a Hilt workaround for accessing the current Activity from a ViewModel without injecting the Activity directly, which could leak across configuration changes. It stores the Activity in a scoped provider, exposes that provider through an Activity-scoped Hilt entry point, and updates the reference through lifecycle callbacks. The approach checks that the Activity is Hilt-aware and is described as supporting multiple simultaneously created Activities while reusing the logical component across configuration recreation. The excerpt omits code and identifiers, so implementation details cannot be fully assessed.

### 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: article

Language: en

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

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

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-apps](<https://devfeed.tech/tags/android-apps.md>), [android-engineer](<https://devfeed.tech/tags/android-engineer.md>), [app](<https://devfeed.tech/tags/app.md>), [block](<https://devfeed.tech/tags/block.md>), [compose](<https://devfeed.tech/tags/compose.md>), [config](<https://devfeed.tech/tags/config.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [coroutine](<https://devfeed.tech/tags/coroutine.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [delay](<https://devfeed.tech/tags/delay.md>), [flow](<https://devfeed.tech/tags/flow.md>), [fragment](<https://devfeed.tech/tags/fragment.md>), [gabor-varadi](<https://devfeed.tech/tags/gabor-varadi.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [leakcanary](<https://devfeed.tech/tags/leakcanary.md>), [leaks](<https://devfeed.tech/tags/leaks.md>), [lifecycle](<https://devfeed.tech/tags/lifecycle.md>), [now-in-android](<https://devfeed.tech/tags/now-in-android.md>), [operators](<https://devfeed.tech/tags/operators.md>), [scope](<https://devfeed.tech/tags/scope.md>), [stream](<https://devfeed.tech/tags/stream.md>), [twitter](<https://devfeed.tech/tags/twitter.md>)

### AI overview

The 5-second WhileSubscribed timeout keeps an upstream flow active briefly after its last collector disappears, which can avoid restarting it during an activity configuration change. Without the delay, rotation can drop the subscription count to zero, stop sharing, then restart the upstream flow on resume; the cached state value is reused. The author objects to treating this delay as a default for every ViewModel flow. Eagerly starting sharing avoids that restart, but keeps the upstream flow active for the ViewModel's lifetime, typically tied to an Activity or Fragment. The excerpt does not describe further limitations or alternatives.

### 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