🛠️
LNUI-702Date picker: month navigation feels laggy on low-end devices
290 / 291

Date picker: month navigation feels laggy on low-end devices

Navigating between months on my old Android phone takes almost a second, the animation stutters badly.user feedback, support ticket #482

Reproduced on a throttled 4x CPU profile. Each month navigation re-renders 42 day cells plus the header, and every cell recomputes its formatter.

Hypotheses

  • The Intl.DateTimeFormat instance is created per cell per render — hoist and reuse
  • Month transition animates box-shadow (paint-heavy), switch to transform/opacity
  • Day cells can be memoized: only selection and today change between renders
Chrome performance trace of a month navigation
Trace — 610ms scripting, 220ms rendering on 4x throttle

Activity

lucas.martin created the issue· 10d ago
llucas.martin5d ago

Hoisting the formatter alone cuts scripting from 610ms to 180ms. The rest is the shadow animation.

mmia.patel4d ago

Design is fine with a simple opacity crossfade on low-end devices — we can key it on prefers-reduced-motion too.

1