Skip to content

refactor(diff-viewer): remove debug/timing logs added in #773#778

Merged
matt2e merged 1 commit into
mainfrom
remove-logs
Jun 10, 2026
Merged

refactor(diff-viewer): remove debug/timing logs added in #773#778
matt2e merged 1 commit into
mainfrom
remove-logs

Conversation

@matt2e

@matt2e matt2e commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Removes the temporary debug and timing instrumentation that was added while landing the diff-viewer virtualization work in #773, now that the perf investigation is complete.

Changes

  • diff_commands.rs — drop the log::info! cache-hit/cache-miss and ensure_cache_populated timing logs in get_diff_files_impl and get_file_diff_impl.
  • diffViewerState.svelte.ts — remove the markDiffOpenClick / lastOpenClickAt click-to-open timing machinery and the console.info/console.warn timing logs in loadFiles, loadFileDiff, and switchContext. The loadFileDiff error log is simplified back to a plain failure message.
  • DiffModal.svelte — remove the double-rAF render-tail timing $effect.
  • BranchCard.svelte — drop the now-unused markDiffOpenClick import and its call sites.

No behavioral change beyond removing log output.

The virtualization perf work in #773 also introduced a layer of
debug/timing instrumentation to measure it. Remove only that logging
(and the scaffolding that existed solely to feed it), restoring the
affected code paths to their pre-#773 behavior while keeping the
virtualization feature fully intact.

- diff_commands.rs: drop the 8 cache-hit / cache-miss / populate-timing
  log::info! calls and the two t_populate Instant bindings; the
  pre-existing `start` timer and its surrounding logs are untouched.
- BranchCard.svelte: remove the markDiffOpenClick import and all call
  sites; restore onViewWorktreeDiff to its single-line form.
- DiffModal.svelte: remove the render-tail timing $effect.
- diffViewerState.svelte.ts: remove lastOpenClickAt / markDiffOpenClick,
  the click-to-open and per-call timing console logs, and restore the
  original "Failed to load diff" error log.

cargo check passes with no warnings; the four touched files now match
their pre-#773 state exactly and markDiffOpenClick has no remaining
importers repo-wide.

Signed-off-by: Matt Toohey <contact@matttoohey.com>
@matt2e matt2e requested review from baxen and wesbillman as code owners June 10, 2026 06:45
@matt2e matt2e merged commit 796f8c8 into main Jun 10, 2026
5 checks passed
@matt2e matt2e deleted the remove-logs branch June 10, 2026 06:55
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