ilang opened a new pull request, #761: URL: https://github.com/apache/commons-vfs/pull/761
## Summary - Internal VFS navigation (`getParent()`, `getRoot()`, `getChildren()` child resolution, symlink resolution) triggers `CacheStrategy.ON_RESOLVE` refresh, causing redundant FTP/SFTP operations - This was always wasteful (2 LIST commands instead of 1 for sibling file lookups), but became O(N) after PR #758 added unconditional `childMap = null` to `FtpFileObject.refresh()` - A directory with 50 files produces ~50 LIST commands instead of 1 ## Fix 1. Add `resolveFileInternal()` that skips the ON_RESOLVE refresh for internal navigation 2. After a fresh directory listing, FTP and SFTP providers propagate metadata to cached children in-place (preserving object identity) ## Test plan - [x] `FtpGetChildrenListCommandTest`: verifies `findFiles()` issues exactly 1 LIST with ON_RESOLVE (50 files) - [x] `SftpGetChildrenListCommandTest`: verifies refresh + `findFiles()` returns fresh children - [x] All existing tests pass (3208 tests, 0 failures) - [x] Checkstyle clean JIRA: https://issues.apache.org/jira/browse/VFS-862 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
