You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2020/12/15 10:13:53 UTC

[GitHub] [commons-io] michielgkalkman opened a new pull request #174: Restructure moveDirectoryToDirectory

michielgkalkman opened a new pull request #174:
URL: https://github.com/apache/commons-io/pull/174


   I think this version performs better, especially when the directory to move to already exists (2 calls to exists are skipped).


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-io] garydgregory commented on pull request #174: Restructure moveDirectoryToDirectory

Posted by GitBox <gi...@apache.org>.
garydgregory commented on pull request #174:
URL: https://github.com/apache/commons-io/pull/174#issuecomment-745411846


   Hi @michielgkalkman 
   Don't you mean ONE call to `exists()` skipped instead of 2?
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-io] garydgregory merged pull request #174: Tiny performance improvement in FileUtils#moveDirectoryToDirectory()

Posted by GitBox <gi...@apache.org>.
garydgregory merged pull request #174:
URL: https://github.com/apache/commons-io/pull/174


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-io] garydgregory edited a comment on pull request #174: Restructure moveDirectoryToDirectory

Posted by GitBox <gi...@apache.org>.
garydgregory edited a comment on pull request #174:
URL: https://github.com/apache/commons-io/pull/174#issuecomment-745411846


   Hi @michielgkalkman 
   Don't you mean ONE call to `exists()` is skipped instead of 2?
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-io] michielgkalkman commented on pull request #174: Restructure moveDirectoryToDirectory

Posted by GitBox <gi...@apache.org>.
michielgkalkman commented on pull request #174:
URL: https://github.com/apache/commons-io/pull/174#issuecomment-746200897


   No, in the original code, when the destination directory already exists, you do an exists() on this directory in lines 2173 and 2178 before isDirectory() is executed.
   
   However, isDirectory() can be executed right away (it does an exists() itself) and thus you skip two calls to exists().
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org