TASK-077: a baseline profile for the app's own code, version 0.2.6

The APK names all of com.ubisam.ubgitea as code to compile ahead of
time. The phone does so in the background after installing, and again
after each update; until then the app runs as before.

Agent: main (opus)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
최민영 2026-10-12 18:30:01 +09:00
parent 137480f30d
commit d9450eedb6
4 changed files with 80 additions and 2 deletions

View File

@ -16,8 +16,8 @@ android {
targetSdk = 36
// Raised for every build published to the download page (TASK-066), or the app will not
// see it as newer.
versionCode = 7
versionName = "0.2.5"
versionCode = 8
versionName = "0.2.6"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

View File

@ -0,0 +1,2 @@
HSPLcom/ubisam/ubgitea/**->**(**)**
Lcom/ubisam/ubgitea/**;

View File

@ -1768,3 +1768,26 @@ This is the append-only implementation and handoff record shared by Codex and Cl
to the product owner, who put them off. The in-app update from 0.2.4 is used for the first
time by this version and was not watched on a device.
## 2026-10-12 (continued) — TASK-077: a baseline profile for the app's code, published as 0.2.6
- Request: the product owner asked for the baseline profile to be added and published as 0.2.6,
knowing it takes effect about a day after installing and again after each update.
- What changed: `app/src/main/baseline-prof.txt` names every class and method under
`com.ubisam.ubgitea`. The build already carried the libraries' profiles and the installer
that hands them to the phone; this adds the app's own code to them. Version 0.2.6
(versionCode 8). Source pushed to `main`; `UBGitea.apk` and `version.json` on the `apk`
branch replaced.
- Why all of the app's code and not a recorded startup path: the slow first frames measured
under TASK-069 were in the screens' own code, wherever the user went, and the app is small.
- Checks and results: the five required checks and `assembleRelease` pass; lint 0 errors. On
the product owner's device, after one launch, the phone's profile for the app listed about
30,000 of its methods. Compiled from it over adb
(`cmd package compile -m speed-profile`, what the phone does by itself in the background),
the slowest frame of a tab move was 5–16 ms, of opening a card under 활동 중인 저장소
17–28 ms, and of Back 12–13 ms. Installed and not yet compiled, the same build had given
9–50, 34–44 and 14–22 ms. A frame is 8.3 ms. The APK downloaded from the `apk` branch has
the same SHA-256 as the one built here.
- Caution: the measured run was shorter than the earlier ones; the phone was in use during it
and some moves were not recorded. Nothing changes for a user until the phone has compiled
the app in the background, usually overnight while charging, and each update starts that
wait again. R8 is still off (TASK-016).

View File

@ -0,0 +1,53 @@
# TASK-077: A baseline profile for the app's own code, published as 0.2.6
Status: done
Owner: Claude
Reviewer: human product owner
## Request
The product owner asked for the baseline profile to be added and published as 0.2.6
(2026-10-12), after it was explained that it takes effect when the phone next compiles apps in
the background, about a day after installing, and again after each update.
## Outcome
The APK tells the phone which code to compile ahead of time: all of the app's own. Until the
phone has done so the app runs as before.
## Writable paths
- `app/src/main/baseline-prof.txt`
- `app/build.gradle.kts`
- `tasks/077-baseline-profile-and-0.2.6.md`
- `docs/development-log.md`
## Acceptance criteria
- [x] The release APK's profile names the app's own classes and methods, and the phone takes it
up on first launch.
- [x] Compiled from that profile, the moves measured under TASK-069 are no slower than before.
- [x] Version 0.2.6, versionCode 8.
- [x] The source is on `main` of the team's repository.
- [x] `UBGitea.apk` and `version.json` on the `apk` branch are 0.2.6, and the downloaded APK is
byte-identical to the one built here.
## Security and privacy
No additional concerns. The profile lists class and method names the APK already contains. No
secret is in it or in the push.
## Required checks
```text
./gradlew compileDebugKotlin compileDebugUnitTestKotlin testDebugUnitTest assembleDebug lintDebug
./gradlew assembleRelease
```
## Evidence
See the development log entry for TASK-077.
## Review findings
None.