Skip to content

Memoize sidebar timer name lookups - #190

Merged
aldoborrero merged 1 commit into
masterfrom
perf/timer-name-lookups
Sep 10, 2026
Merged

aldoborrero merged 1 commit into
masterfrom
perf/timer-name-lookups

Conversation

@aldoborrero

Copy link
Copy Markdown
Member

Summary

  • Memoize the sidebar timer's project/task name lookups using the same resource-driven pattern as the timesheet.
  • Borrow the cached maps when building the running label, keeping the one-second display tick independent of rebuilding all names.
  • Add a deterministic component regression covering repeated renders, renaming, resource errors, recovery, and unchanged timer invalidation state.

Validation

  • The regression includes the production widget source with controlled resource responses and a counted name-copy boundary. On the original component, 100 extra renders produce 101 copies of each fixture name instead of 1; with this change, the counts stay at 1 until the relevant resource changes.
  • cargo test -p horae --features server --test timer_widget --locked --offline passes.
  • Server all-target Clippy with -D warnings, WASM compilation, Rust formatting, and git diff --check pass.
  • The existing three WASM warnings remain unchanged and are not suppressed by this PR.
  • The existing CI test command discovers the new integration-test target automatically.

No SQL, schema, dependencies, timer clock logic, start/stop actions, or database contents changed. The copy counts are a regression assertion, not a wall-clock performance estimate. No live-browser test or full database suite was run locally for this scoped change; required CI runs the full suite before merge.

@aldoborrero
aldoborrero added this pull request to the merge queue Sep 10, 2026
Merged via the queue into master with commit d5b59eb Sep 10, 2026
2 checks passed
@aldoborrero
aldoborrero deleted the perf/timer-name-lookups branch September 10, 2026 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant