Skip to content

armgit / ente

Public Imported from GitHub
0

đź’š End-to-end encrypted cloud for everything.

[mob][photos] Tune faces timeline cadence

laurenspriem9a414ae59ccc
diff --git a/mobile/apps/photos/.docs/face_timeline_spec.md b/mobile/apps/photos/.docs/face_timeline_spec.md
index 2bd2893463..b177cc9b73 100644
--- a/mobile/apps/photos/.docs/face_timeline_spec.md
+++ b/mobile/apps/photos/.docs/face_timeline_spec.md
@@ -50,8 +50,6 @@ Deliver an on-device, auto-playing “faces timeline” for eligible named peopl
- Respect cache eviction rules to avoid leaking face crops beyond required usage.
### Implementation Findings & Follow-Up
-- **Background recompute drops people.** The current implementation caps the per-person precompute queue at 200 entries (`lib/services/faces_timeline/faces_timeline_service.dart`) and the queue helper (`lib/utils/standalone/task_queue.dart`) evicts the oldest task when that cap is exceeded. On accounts with >200 named people this means timelines silently never compute for most users. We need a follow-up that guarantees every person is processed (larger cap, disk-backed backlog, or a smarter scheduling policy) and adds logging/metrics so we can detect backlogs.
-- **Share affordance still active.** Iteration 1 calls for the share UI to be hidden or disabled. Right now the share icon in `FacesTimelinePage` still invokes `onPressed` and only shows a “coming soon” snackbar. Please disable the control until export ships so QA can verify the correct state.
-- **Playback cadence slower than spec.** `_frameInterval` in `FacesTimelinePage` is currently 1.2 s, outside the 0.8–1.0 s window defined above. Tighten the interval (e.g. 900–1000 ms) and confirm transitions still feel smooth.
-- **Frame loading is fully serial.** `_loadFrames` fetches crops in sequence, so the user waits for the entire list before the first frame shows. Update the loader to display the first frame immediately and prefetch subsequent frames in the background (ensuring the “preload next frame” requirement stays satisfied).
-- **Forced recompute flag dropped.** `FacesTimelineService.schedulePersonRecompute` enqueues work via `TaskQueue.addTask`, which deduplicates only by `id` and retains the closure from the first enqueue. Later invocations (even with `force: true`) cannot change the captured `force`/`trigger` values, so a forced request can still run as non-forced and be skipped by the 24 h cooldown. Ensure the queued task reflects the latest flags so forced recomputes always bypass throttling.
+- **[Priority: Medium] Background recompute drops people.** The current implementation caps the per-person precompute queue at 200 entries (`lib/services/faces_timeline/faces_timeline_service.dart`) and the queue helper (`lib/utils/standalone/task_queue.dart`) evicts the oldest task when that cap is exceeded. On accounts with >200 named people this means timelines silently never compute for most users. We need a follow-up that guarantees every person is processed (larger cap, disk-backed backlog, or a smarter scheduling policy) and adds logging/metrics so we can detect backlogs.
+- **[Priority: Low] Share affordance still active.** Iteration 1 calls for the share UI to be hidden or disabled. Right now the share icon in `FacesTimelinePage` still invokes `onPressed` and only shows a “coming soon” snackbar. Please disable the control until export ships so QA can verify the correct state.
+- **[Priority: Medium] Forced recompute flag dropped.** `FacesTimelineService.schedulePersonRecompute` enqueues work via `TaskQueue.addTask`, which deduplicates only by `id` and retains the closure from the first enqueue. Later invocations (even with `force: true`) cannot change the captured `force`/`trigger` values, so a forced request can still run as non-forced and be skipped by the 24 h cooldown. Ensure the queued task reflects the latest flags so forced recomputes always bypass throttling.
diff --git a/mobile/apps/photos/lib/ui/viewer/people/faces_timeline_page.dart b/mobile/apps/photos/lib/ui/viewer/people/faces_timeline_page.dart
index 6dea5c6fce..82ce195d8a 100644
--- a/mobile/apps/photos/lib/ui/viewer/people/faces_timeline_page.dart
+++ b/mobile/apps/photos/lib/ui/viewer/people/faces_timeline_page.dart
@@ -27,7 +27,7 @@ class FacesTimelinePage extends StatefulWidget {
class _FacesTimelinePageState extends State<FacesTimelinePage>
with TickerProviderStateMixin {
- static const _frameInterval = Duration(milliseconds: 1200);
+ static const _frameInterval = Duration(milliseconds: 1000);
final Logger _logger = Logger("FacesTimelinePage");
int _frameViewVersion = 0;