blownchart

Description

First launch (home screen appearing) and app-drawer list building were much slower than they should be on a device with a large number of installed apps - up to 10-15s just to see the home screen, and up to 30s for the app drawer’s list to finish building, on a device with 1766 installed apps. Settings screens backed by the same installed-app enumeration (the app-picker for a drawer folder, hidden apps, pick app for a gesture) were even worse - up to 40s+ on first open.

Part of the fix is original to this fork; part of it borrows a thread-scheduling fix Google already shipped upstream for Lawnchair 16 (362fa9e96a1, Bug: 396250724), ported back onto this fork’s pre-Kotlin-conversion loader code since 15-dev predates that rewrite.

Reasoning

Three independent issues stacked on top of each other:

Testing

Manually verified on the same ~1766-app / 40-folder device used for the earlier folder-list-performance fix:

Compatibility

No public API, data model, or DB schema changes. The bulk-icon-loading toggle is preserved (now defaulting to on) rather than removed, unlike upstream Lawnchair 16, so it can still be turned off per-device if needed.

Type of change

:white_check_mark: Performance (A code change that improves performance)