Closed mgree closed 1 month ago
This should be relatively easy to achieve with fts
, which we can use in the following way:
fts_open
the upperdirtraverse
function.)
a. On a new directory in the upperdir, use fts_children
to compute # of files and their total disk usage.
b. On a whiteout of what was a directory in the lowerdir, a separate call to fts_open
on the lowerdir (or simply calling out to du
) will tell else how many files were deleted.
When @ericzty demoed
try
installing rust at the recent pash retreat, try was fast but the summary was painfully slow and very noisy. The problem is in thesummary()
routine.We should not be slow or noisy.
Less noise
try explore
to see details if they care.Less slowness
There are three key stages in summarizing:
find
infind_upperdir_changes
process_changes
summary
I suspect the diffing and reporting are the slow part. (Being less noisy means less printing, which of course means less slowness. Still waters run fast.) But we should profile this and find out. It may be necessary to replace
process_changes
with a short C program.