Skip to content

W8: feat/working-tree-performance-finalization - #64

Merged
aman-a-shah merged 1 commit into
mainfrom
feat/working-tree-performance-finalization
Nov 8, 2026
Merged

aman-a-shah merged 1 commit into
mainfrom
feat/working-tree-performance-finalization

Conversation

@Saanvi521

Copy link
Copy Markdown
Collaborator

Summary

  • Fixes the cost the W8 profile found: the file walk called os.path.relpath once per file (6003 getcwd calls for 3000 files). It now works out each folder once, in one shared walk_working_files() used by status, diff and the name lists.
  • status and diff take about 45% less time with many files. Results are identical; every file is still read and hashed, with no cache and no timestamp shortcuts.
  • Includes the Week 7 status/diff output, rebased onto current main so M3's merge-resolve code in cmd_add and cmd_status is kept.
  • Adds regressions: same-size edit with preserved timestamps is still found, the walk helper's paths, and Myers on a larger text with repeated lines. Before and after timings are in docs/performance.md.

Validation

  • scripts/quality-check.sh
  • Manual testing, if applicable:

Checklist

  • The change is focused and easy to review.
  • Tests were added or updated for behavior changes.
  • Documentation was updated for user-facing or setup changes.
  • No secrets, generated artifacts, or local-only files are included.

Notes for Reviewers

@aman-a-shah aman-a-shah left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the status/diff changes, checkout protections, and regression coverage. Lint, formatting, and all 410 tests pass on the PR head. The performance report references an absent bench_working_tree.py; track reproducibility and shared-benchmark reruns in the final handoff work.

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.

2 participants