JuliaIO / Tar.jl

TAR files: create, list, extract them in pure Julia
MIT License
79 stars 19 forks source link

write_tarball: reduce the number of lstat calls #41

Closed StefanKarpinski closed 4 years ago

StefanKarpinski commented 4 years ago

We were lstat'ing each file twice before: once to see if it's a directory when sorting entries to emit the tarball and again to generate a tar header for it. This saves the first lstat result and passes it into the recursive call to write_tarball, thereby avoiding the second lstat call.

codecov[bot] commented 4 years ago

Codecov Report

Merging #41 into master will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #41   +/-   ##
=======================================
  Coverage   92.95%   92.95%           
=======================================
  Files           4        4           
  Lines         454      454           
=======================================
  Hits          422      422           
  Misses         32       32           
Impacted Files Coverage Δ
src/create.jl 94.24% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c8c5b0d...c76ae6e. Read the comment docs.

StefanKarpinski commented 4 years ago

Closing in favor of #42.