Commit 08ebd0a9f5d5a9edabba87ffcc06cb3552d3ed25

Stefan Sperling 2019-02-22T11:24:36

enable commit pre-fetching in tog log view again; this is faster

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/tog/tog.c b/tog/tog.c
index 7c74aca..e25786c 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -1297,7 +1297,11 @@ scroll_down(struct commit_queue_entry **first_displayed_entry, int maxscroll,
 
 	pentry = TAILQ_NEXT(*last_displayed_entry, entry);
 	if (pentry == NULL && !*log_complete) {
-		(*commits_needed) += maxscroll;
+		/*
+		 * Ask the log thread for required amount of commits
+		 * plus some amount of pre-fetching.
+		 */
+		(*commits_needed) += maxscroll + 20;
 		err = trigger_log_thread(0, commits_needed, log_complete,
 		    need_commits);
 		if (err)