Check for updates from clean slate (no previous index) %time %allot
-------------------------------------------------------------------------------
rebuildTarIndex Hackage.Security.Client.Repository.Cache 64.4 72.2
fileInfo Hackage.Security.TUF.FileInfo 22.2 19.4
Check for updates (existing index, small delta) %time %allot
-------------------------------------------------------------------------------
fileInfo Hackage.Security.TUF.FileInfo 68.7 64.2
rebuildTarIndex Hackage.Security.Client.Repository.Cache 27.6 32.7
This difference comes from the fact that if we do a check for updates from a clean slate, we download and SHA the (smaller) .tar.gz, but when we do an incremental update we (necessarily) SHA the much larger .tar file; hence the flip in ratios. However, we've now moved from SHA to cryptohash, and the computation of the SHA now takes up much less time even when doing an incremental update:
Check for updates (existing index, small delta) %time %allot
-------------------------------------------------------------------------------
rebuildTarIndex Hackage.Security.Client.Repository.Cache 71.6 91.2
fileInfo Hackage.Security.TUF.FileInfo 20.9 0.0
This does however suggest that we should really rebuild the tar index incrementally (#22).
Results with the SHA package:
This difference comes from the fact that if we do a check for updates from a clean slate, we download and SHA the (smaller)
.tar.gz
, but when we do an incremental update we (necessarily) SHA the much larger.tar
file; hence the flip in ratios. However, we've now moved fromSHA
tocryptohash
, and the computation of theSHA
now takes up much less time even when doing an incremental update:This does however suggest that we should really rebuild the tar index incrementally (#22).