| BlobStore#listDescendants with S3 receives the size and date of each object from ListObjectsV2 but drops them, so getSize() on a listed blob sends a HeadObject request. Summing the sizes of 100 listed blobs costs 101 requests. Proposal: the S3 iterator passes size() and lastModified() to the S3Blob it creates, which keeps them as a snapshot; the file system walks with BasicFileAttributes. The listDescendants javadoc would say that the size and date of the returned blobs may be the ones seen during the listing. Depends on the last modification date being part of the API. |