Skip to content

Instantly share code, notes, and snippets.

@fried
Last active June 3, 2016 00:46
Show Gist options
  • Save fried/e599ed68eeedbe97df8ba27e5e5e75c4 to your computer and use it in GitHub Desktop.
Save fried/e599ed68eeedbe97df8ba27e5e5e75c4 to your computer and use it in GitHub Desktop.
Speeding up tarfile by not truncating on non-sparse tar entries. Using two random tar files of 1024 files each 10MB in size.
Generating Random Test Tar Files................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Testing Tar Impls
Time Delta for TarFile: 148.23699307441711
Time Delta for FastTarFile: 107.71058106422424
Time Diff: 40.52641201019287 0.27338932859929255
@fried
Copy link
Author

fried commented Jun 3, 2016

On OSX with SSD it's not very pronounced. but the above is ext4

Time Delta for TarFile: 68.44631910324097
Time Delta for FastTarFile: 64.334627866745
Time Diff: 4.111691236495972 0.06007176558748328

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment