[file-history] shorten wait time for synchronous diff loading in preview

This allows to walk through the history graph faster.
This commit is contained in:
Julia Beliaeva
2018-09-25 22:00:29 +03:00
parent 3862ec2a0d
commit 70f2ff945a
2 changed files with 9 additions and 1 deletions
@@ -117,10 +117,14 @@ public abstract class CacheDiffRequestProcessor<T> extends DiffRequestProcessor
() -> {
applyRequest(new LoadingDiffRequest(getRequestName(requestProvider)), force, scrollToChangePolicy);
},
ProgressWindow.DEFAULT_PROGRESS_DIALOG_POSTPONE_TIME_MILLIS
getFastLoadingTimeMillis()
);
}
protected int getFastLoadingTimeMillis() {
return ProgressWindow.DEFAULT_PROGRESS_DIALOG_POSTPONE_TIME_MILLIS;
}
@Nullable
protected DiffRequest loadRequestFast(@NotNull T provider) {
return myRequestCache.get(provider);
@@ -38,6 +38,10 @@ internal class FileHistoryDiffPreview(project: Project, private val changeGetter
}
}
override fun getFastLoadingTimeMillis(): Int {
return 10
}
private inner class MyChangeWrapper internal constructor(private val change: Change) : ChangeViewDiffRequestProcessor.Wrapper() {
override fun getUserObject(): Any {