mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-119539 Optimized before and after filepaths comparison while detecting if "Change" is move/rename
Frequent "FilePath.getIOFile()" calls could lead to performance issues. For instance, there are snapshots with slow "Change.isMoved() or Change.isRenamed()" -> "Change.cacheRenameOrMove()" -> "Change.revisionPathsSame()" -> "LocalFilePath.getIOFile()" method calls.
This commit is contained in:
@@ -213,8 +213,9 @@ public class Change {
|
||||
}
|
||||
|
||||
private boolean revisionPathsSame() {
|
||||
final String path1 = myBeforeRevision.getFile().getIOFile().getAbsolutePath();
|
||||
final String path2 = myAfterRevision.getFile().getIOFile().getAbsolutePath();
|
||||
final String path1 = myBeforeRevision.getFile().getPath();
|
||||
final String path2 = myAfterRevision.getFile().getPath();
|
||||
// intentionally comparing case-sensitively even on case-insensitive OS to identify case-only renames
|
||||
return path1.equals(path2);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user