Skip to content

Conversation

@Xuyuchao-juice
Copy link
Contributor

Why this change:

The original implementation used doReaddir to load all directory entries at once, which causes performance issues and high memory pressure when cloning large directories. This leads to slow metadata operations, negative ETA values, and progress staying at 0 for extended periods.

How it's implemented:

Replace the single doReaddir call with DirHandler's List method to fetch directory entries in batches. The implementation maintains the directory-first processing strategy (directories before files) to maximize parallelism, while using incremental offset-based fetching to reduce per-query overhead and improve overall performance for large directories.

@codecov
Copy link

codecov bot commented Nov 17, 2025

Codecov Report

❌ Patch coverage is 58.97436% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 22.92%. Comparing base (2d372c7) to head (ef29f65).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
pkg/meta/base.go 58.97% 26 Missing and 6 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #6469       +/-   ##
===========================================
- Coverage   48.11%   22.92%   -25.20%     
===========================================
  Files         133       30      -103     
  Lines       42009    20539    -21470     
===========================================
- Hits        20213     4708    -15505     
+ Misses      19445    15298     -4147     
+ Partials     2351      533     -1818     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@davies davies requested a review from jiefenghuang November 17, 2025 09:11
@jiefenghuang
Copy link
Contributor

Need to fix unit tests.

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.

3 participants