Git log: 1) always load short form of skeleton; further load details 2) preload 15 instead of 5 commits with details in first step [review=kirill.safonov]

(cherry picked from commit c521f078d40ce026242fa9ad8aaafea3e8579376)
This commit is contained in:
irengrig
2011-05-04 14:32:48 +04:00
parent 584220ee2e
commit 1d707f3a63
2 changed files with 3 additions and 3 deletions
@@ -114,7 +114,7 @@ public class LoadAlgorithm {
protected void processResult(Result result) {
assert LoadType.TEST.equals(myState.myValue);
myState.takeDecision(result.getTime() > ourTestTimeThreshold);
myState.takeDecision(false);
}
}
@@ -33,7 +33,7 @@ import java.util.*;
* @author irengrig
*/
public class LoaderAndRefresherImpl implements LoaderAndRefresher<CommitHashPlusParents> {
private final static int ourTestCount = 5;
private final static int ourFirstLoadCount = 15;
private final static int ourPreload = (! parameterCheck(Integer.getInteger("git.log.preload.size"))) ? 100 : Integer.getInteger("git.log.preload.size");
private final Collection<String> myStartingPoints;
@@ -144,7 +144,7 @@ public class LoaderAndRefresherImpl implements LoaderAndRefresher<CommitHashPlus
int count = MediatorImpl.ourManyLoadedStep;
boolean shouldFull = true;
if (LoadAlgorithm.LoadType.TEST.equals(loadType)) {
count = ourTestCount;
count = ourFirstLoadCount;
} else if (LoadAlgorithm.LoadType.SHORT.equals(loadType) || LoadAlgorithm.LoadType.SHORT_START.equals(loadType)) {
shouldFull = false;
} else if (LoadAlgorithm.LoadType.FULL_PREVIEW.equals(loadType)) {