Performance Optimization Articles
Phased Android Startup Initialization with background and activity StartTypes
Putting every initialization task into Application makes cold-start cost unpredictable. This article presents a phased startup framework that separates background and activity StartTypes with explicit dependencies, thread scheduling, fallback behavior, and timing metrics.
Read Post
Async Inflate Manager: Thread-Pool Preloading for Faster First Frames
First-frame latency is not only about network and image loading. Complex XML layout inflation on the main thread can be expensive too. This article presents an async Inflate manager that pre-creates Views on a thread pool, uses MutableContextWrapper for context safety, and falls back to UI-thread inflation when needed.
Read Post
Bytecode try-catch Instrumentation for Third-Party Crashes: Precise Containment with hookPoint
When a third-party SDK crash cannot be fixed in source code, bytecode try-catch instrumentation can be a practical containment tool. This article explains a hookPoint-driven design for precise method matching, non-fatal exception capture, reporting, and safety boundaries.
Read Post
Compose Multiplatform Desktop in Practice: JVM Windows and Platform Interop
A practical migration from Electron to Compose Desktop, covering JVM window management, menu bars, drag and drop, system trays, platform interop, packaging, and distribution. Startup time improved by 60% and memory usage dropped by 70%.
Read Post
A Unified Image Loading Facade with ImageUrlProcessor
If every page calls the image library directly, URL rules, size parameters, and preload logic scatter across the codebase. This article introduces a unified image-loading facade built around ImageUrlProcessor, preload scheduling, and observability.
Read Post
Route Prefetching and Request Merging for Faster First-Screen Data
Page speed depends not only on API latency, but also on whether requests start early enough and whether duplicate calls are suppressed. This article combines PrefetchRouterInterceptor at the routing layer with MergeHolder at the network layer.
Read Post
Android Simpleperf Flame Graphs: From CPU Sampling to Performance Bottleneck Analysis
A deep dive into Android Simpleperf, covering flame graph generation, call-stack analysis, cold-start hotspots, RenderThread investigation, multi-thread CPU attribution, and how to combine Simpleperf with Systrace.
Read Post
What Are RecyclerView's Four Cache Levels? Understanding ViewHolder Reuse
A practical explanation of RecyclerView's four cache levels, ViewHolder reuse order, RecycledViewPool, Prefetch, and how they affect scrolling performance.
Read Post
Android 16 KB Page Size Migration: ELF Alignment, NDK Builds, and Performance
Android 15 and Google Play are moving toward 16 KB pages. This guide explains ELF segment alignment, linker behavior, NDK build changes, TLB validation, and CI gates.
Read Post
Android Dynamic Feature Delivery: From App Bundle to SplitCompat
An end-to-end guide to Android dynamic feature delivery, covering App Bundle splits, SplitCompat runtime loading, Play Feature Delivery, and package size tradeoffs.
Read Post
Android Audio System Deep Dive: AudioFlinger Mixing and AAudio Low Latency
A deep architecture walkthrough of the Android audio pipeline, from AudioTrack buffers and AudioFlinger mixer scheduling to AAudio MMAP pass-through, latency tradeoffs, and production API choices.
Read Post
Android Perfetto End to End: ftrace, TrackEvent, and Production Monitoring
A deep dive into Android Perfetto, from the traced and traced_probes daemon architecture to kernel ftrace sources, shared ring buffers, SDK TrackEvent instrumentation, and production observability.
Read Post
Designing an On-Device LLM Inference Scheduler: Priority Queues and Backpressure in Practice
This article shows how to build a scheduling layer above an on-device inference engine, using priority queues, preemption, and backpressure to avoid OOMs, unpredictable latency, and out-of-order results.
Read Post
Android On-device AI Real-time Video: CameraX Frames, GPU Preprocessing, and LiteRT Inference
A practical end-to-end Android real-time video AI pipeline, covering CameraX head-of-line blocking, GPU YUV preprocessing, LiteRT inference jitter, async staging, and frame-expiration control.
Read Post
Android On-device AI Prompt Engineering: Token Budgets, Few-shot Compression, and TTFT Control
A practical Android on-device LLM prompt-engineering guide showing how token budgeting, few-shot template compression, and dynamic budget switching reduced first-token latency from 8.7 seconds to under 2 seconds.
Read Post
Android On-device AI System Health: Dynamic Inference Degradation by Thermal, Battery, and Memory Pressure
A practical three-dimensional degradation strategy for Android on-device AI inference, coordinating thermal status, battery state, and memory pressure with normalized scoring, model preloading, and state migration.
Read Post
Android Memory Leak Governance: LeakCanary, HPROF, and Production Monitoring
A full Android memory leak governance workflow covering LeakCanary's WeakReference sentinel, HPROF reference-chain analysis, production retained-object monitoring, conditional dumps, and CI gates.
Read Post
Android RenderThread and HWUI: From DisplayList Recording to GPU Rasterization
A deep dive into Android HWUI rendering, main-thread and RenderThread responsibilities, DisplayList recording, RenderNode synchronization, Skia/Vulkan rasterization, and Compose rendering.
Read Post
Android ANR Governance: From Main-Thread Stalls to ANR Trace Analysis
A practical ANR analysis workflow covering signal-triggered traces, MessageQueue backlog, Binder timeouts, lock contention, Perfetto alignment, and production monitoring.
Read Post
Android Cold Start Optimization: From Zygote Fork to First Frame
A Perfetto-driven Android cold start optimization guide covering Zygote fork, bindApplication, Activity creation, first-frame composition, ContentProvider traps, layered initialization, and Binder backlog.
Read Post