refactor(diff-viewer): remove debug/timing logs added in #773#778
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 thelog::info!cache-hit/cache-miss andensure_cache_populatedtiming logs inget_diff_files_implandget_file_diff_impl.diffViewerState.svelte.ts— remove themarkDiffOpenClick/lastOpenClickAtclick-to-open timing machinery and theconsole.info/console.warntiming logs inloadFiles,loadFileDiff, andswitchContext. TheloadFileDifferror log is simplified back to a plain failure message.DiffModal.svelte— remove the double-rAF render-tail timing$effect.BranchCard.svelte— drop the now-unusedmarkDiffOpenClickimport and its call sites.No behavioral change beyond removing log output.