Widget Placement Was Waiting for Image Conversion to Release a Lock

Monday, October 19, 2026

Android Hitoma Launcher Technical

t f B! P L

Version(s) containing the fix: 2.6.3.

The save itself was not slow

As the home gained more icons, widget additions and moves took longer to appear. On October 4, 2026, measurements showed that waiting to start a save and waiting for its display mattered more than saving itself.

When a UI feels slow, separating execution time from waiting before and after it helps locate the cause. Here, saving waited for a lock held by another operation.

Saving waited for image preparation

A lock prevents loading and saving from changing shared data at the same time. Loading held it while retrieving data, querying app information, and converting images. Saving could not start until that work finished.

Background work still waits its turn when it uses the same lock. Review how much work holds the lock rather than only changing where the work runs.

Lock only the work that must not overlap

We kept the consistent retrieval of required data inside the lock and moved conversion for display outside it. Saving could then begin while image preparation continued.

Before removing a lock, check whether the operation reads shared data again later. Making it work only from the information already retrieved can preserve consistency while reducing waiting.

Review the wait after saving too

The saved position also waited for every icon to reload. We now apply a successfully saved position to the UI and discard older load results. Failed saves and moves rejected because of overlap do not change the position.

List and editing screens can likewise ask whether a small change needs to wait for a full reload. They also need protection against older results arriving later and reversing the display.

Code from the Fix

The following excerpts illustrate the fix; some examples omit surrounding code.

internal suspend fun <T, R> read(
    snapshot: suspend () -> T,
    convert: suspend (T) -> R,
): R = withContext(Dispatchers.IO) {
    convert(run(snapshot))
}

run(snapshot) acquires the lock to fetch the required data. convert receives that snapshot and runs outside the lock. Moving image conversion to a background thread and shortening lock ownership address different waits.

Separate the wait, the work, and the display

Record when the request arrives, the lock is acquired, saving finishes, and the UI updates. This reveals what is being waited on instead of reporting one undifferentiated “save time.”

Before adding caches or rewriting processing, break down the waiting. Reducing unnecessary queues can improve responsiveness without making the underlying operation faster.

Search This Blog

QooQ