mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
vcs: More diagnostics for repository tab performance (IDEA-119539)
This commit is contained in:
+8
-16
@@ -1,20 +1,7 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.openapi.vcs.changes.committed;
|
||||
|
||||
import com.google.common.base.Stopwatch;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
@@ -45,7 +32,7 @@ import static com.intellij.openapi.vcs.changes.committed.IncomingChangeState.Sta
|
||||
* @author yole
|
||||
*/
|
||||
public class ChangesCacheFile {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.vcs.changes.committed.ChangesCacheFile");
|
||||
private static final Logger LOG = Logger.getInstance(ChangesCacheFile.class);
|
||||
private static final int VERSION = 7;
|
||||
|
||||
private final File myPath;
|
||||
@@ -818,7 +805,9 @@ public class ChangesCacheFile {
|
||||
myChangesCacheFile.saveIncoming(data, true);
|
||||
}
|
||||
} else {
|
||||
Stopwatch stopWatch = Stopwatch.createStarted();
|
||||
shouldChangeHeader = refreshIncomingInFile(incomingFiles, list);
|
||||
debug("Finished incoming refresh for " + myChangesCacheFile.myLocation.toPresentableString() + " in " + stopWatch.stop());
|
||||
}
|
||||
|
||||
IncomingChangeState.footer();
|
||||
@@ -842,7 +831,9 @@ public class ChangesCacheFile {
|
||||
|
||||
myIndexStreamCachedLength = myChangesCacheFile.myIndexStream.length();
|
||||
// try to process changelists in a light way, remember which files need revisions
|
||||
Stopwatch stopWatch = Stopwatch.createUnstarted();
|
||||
for(IncomingChangeListData data: list) {
|
||||
stopWatch.reset().start();
|
||||
debug("Checking incoming changelist " + data.changeList.getNumber());
|
||||
|
||||
for(Change change: data.getChangesToProcess()) {
|
||||
@@ -854,6 +845,7 @@ public class ChangesCacheFile {
|
||||
revisionDependentFiles.put(key, result.file);
|
||||
}
|
||||
}
|
||||
debug("Finished checking incoming changelist " + data.changeList.getNumber() + " in " + stopWatch.stop());
|
||||
}
|
||||
|
||||
if (!revisionDependentFiles.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user