Skip to content

Commit 65c9b89

Browse files
committed
nemo-view.c: Don't disable update interval progression while loading.
Our delay progession wasn't being used - updates we stuck at 10ms updates, which helped snappiness but in large/slow folders was causing issues. Enable this, and tweak our values. Ramping to a 2 second delay is really too much, and since we have our 'immediate' path fixed for most ordinary locations, we can increase the base delay default a bit also.
1 parent 71b73d1 commit 65c9b89

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/nemo-view.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,14 @@
100100
#include <libnemo-private/nemo-debug.h>
101101

102102
/* Minimum starting update interval for progressive display */
103-
#define UPDATE_INTERVAL_MIN 10
103+
#define UPDATE_INTERVAL_MIN 100
104104
/* One-shot pre-render delay in deferred mode (sort by folder size, deep counts etc.),
105105
* to give async deep counts a chance to arrive before the first render. */
106106
#define UPDATE_INTERVAL_DEFERRED 50
107107
/* Maximum update interval */
108-
#define UPDATE_INTERVAL_MAX 2000
108+
#define UPDATE_INTERVAL_MAX 500
109109
/* Amount of miliseconds the update interval is increased */
110-
#define UPDATE_INTERVAL_INC 250
110+
#define UPDATE_INTERVAL_INC 200
111111
/* Interval at which the update interval is increased */
112112
#define UPDATE_INTERVAL_TIMEOUT_INTERVAL 500
113113
/* Milliseconds that have to pass without a change to reset the update interval */
@@ -4077,6 +4077,9 @@ changes_timeout_callback (gpointer data)
40774077
view->details->loading) {
40784078
/* Increase */
40794079
view->details->update_interval += UPDATE_INTERVAL_INC;
4080+
if (g_getenv("NEMO_BENCHMARK_LOADING")) {
4081+
g_printerr ("Increasing update interval to: %d ms\n", view->details->update_interval);
4082+
}
40804083
}
40814084
ret = TRUE;
40824085
} else {
@@ -4096,9 +4099,7 @@ schedule_changes (NemoView *view)
40964099
/* Remember when the change was queued */
40974100
view->details->last_queued = g_get_monotonic_time ();
40984101

4099-
/* No need to schedule if there are already changes pending or during loading */
4100-
if (view->details->changes_timeout_id != 0 ||
4101-
view->details->loading) {
4102+
if (view->details->changes_timeout_id != 0) {
41024103
return;
41034104
}
41044105

0 commit comments

Comments
 (0)