Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issue in packager #392

Open
gmh04 opened this issue Nov 14, 2017 · 1 comment
Open

Performance issue in packager #392

gmh04 opened this issue Nov 14, 2017 · 1 comment
Assignees

Comments

@gmh04
Copy link
Collaborator

gmh04 commented Nov 14, 2017

Here are some times for creating bags with a small number of files (generally 1-3 files) on my workstation:

1GB - 00:26
5GB - 01:20
10GB - 02:60
50GB - 20:08
100GB - 42:34

@gmh04 gmh04 self-assigned this Nov 14, 2017
@gmh04
Copy link
Collaborator Author

gmh04 commented Nov 14, 2017

A breakdown of the bagInPlace method of BagCreator https://github.com/LibraryOfCongress/bagit-java/blob/v5.0.3/src/main/java/gov/loc/repository/bagit/creator/BagCreator.java#L120-L137 shows 99% (or 134 seconds) of time of this function is createPayloadManifests. This creates the checksums of the files and compares with a manual command-line creation of a md5 checksum of 110 seconds.

Really the place for improvement here is to remove the unnecessary call to isValid

which is taking another 130 seconds (it is redoing the lengthy checksums!). Any issues with bagInPlace should throw an exception, therefore we can assume the bag is valid if a Bag object is returned. This would half the time of createBag.

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

No branches or pull requests

1 participant