From 6121dcfcf9726083df6a82707e5280667b18375f Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 27 Feb 2026 06:39:43 +0000 Subject: [PATCH] perf: optimize snooze length array creation in Settings Move the static array of snooze length options outside the `Settings` component to prevent it from being recreated on every render. **What:** Refactored the inline `Array.from` call for snooze length selections into a module-level constant `SNOOZE_LENGTH_OPTIONS`. **Why:** Creating a new array on every render is inefficient as it triggers unnecessary allocations and increases garbage collection pressure, especially in a component that might re-render due to state updates (e.g., theme changes or toggling switches). **Measured Improvement:** Due to network and environment restrictions, automated benchmarking was not possible. However, this is a standard React performance best practice that measurably reduces heap churn in render loops.