Do not redundantly call File.lastModified() for extracting the timestamp of the PackFile but rather use consistently the FileSnapshot which reads all file attributes in a single bulk call. Change-Id: I932675ae4fe56dcd3833dac249816f097303bb09 Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>tags/v4.5.6.201903121547-r
@@ -164,8 +164,8 @@ public class PackFile implements Iterable<PackIndex.MutableEntry> { | |||
*/ | |||
public PackFile(final File packFile, int extensions) { | |||
this.packFile = packFile; | |||
this.packLastModified = (int) (packFile.lastModified() >> 10); | |||
this.fileSnapshot = FileSnapshot.save(packFile); | |||
this.packLastModified = (int) (fileSnapshot.lastModified() >> 10); | |||
this.extensions = extensions; | |||
// Multiply by 31 here so we can more directly combine with another |