Skip to content

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

Open
Saanvi521 wants to merge 1 commit into
mainfrom
feat/working-tree-performance-finalization
Open

Saanvi521 wants to merge 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

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