From e59b335b41af3de29ed33e6aaa9c00c19555e728 Mon Sep 17 00:00:00 2001 From: "Maxim.Mossienko" Date: Sat, 19 May 2012 01:49:44 +0400 Subject: [PATCH] [optimization] if we reload content from delegate there is no reason for separate getFileLength call --- .../intellij/openapi/vfs/newvfs/persistent/PersistentFS.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/PersistentFS.java b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/PersistentFS.java index c352f2e2908e..613a2f188726 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/PersistentFS.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/PersistentFS.java @@ -506,8 +506,8 @@ public class PersistentFS extends ManagingFS implements ApplicationComponent { if (reloadFromDelegate) { final NewVirtualFileSystem delegate = getDelegate(canonicalFile); - FSRecords.setLength(getFileId(canonicalFile), delegate.getLength(canonicalFile)); final byte[] content = delegate.contentsToByteArray(canonicalFile); + FSRecords.setLength(getFileId(canonicalFile), content.length); ApplicationEx application = (ApplicationEx)ApplicationManager.getApplication(); // we should cache every local files content