Details
-
Sub-task
-
Status: Resolved
-
Minor
-
Resolution: Won't Fix
-
3.0.0-beta1
-
None
-
None
Description
In S3AFileSystem.innerRename(), various ArrayLists are created to track paths to update; these are created with the default size. It could/should be possible to allocate better, so avoid expensive array growth & copy operations while iterating through the list of entries.
- for a single file copy, sizes == 1
- for a recursive copy, the outcome of the first real LIST will either provide the actual size, or, if the list == the max response, a very large minimum size.
For #2, we'd need to get the hint of iterable length rather than just iterate through...some interface {IterableLength.expectedMinimumSize() could do that.