mirror of
https://github.com/androidx/media.git
synced 2025-05-06 23:20:42 +08:00

Calls to File.length() can be O(N) where N is the number of files in the containing folder. This is believed to be true for at least FAT32. Repeated calls for the same file tend to be faster, presumably due to caching in the file system, however are still surprisingly expensive. Hence minimizing the number of calls is preferable. Issue: #4253 PiperOrigin-RevId: 228179921