diff options
author | Koni Marti <koni.marti@gmail.com> | 2022-07-26 15:41:13 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-07-26 22:22:48 +0200 |
commit | 54a0a377e03074a27d7d9e84092487c55761b510 (patch) | |
tree | 2c6bf66efa9f5e997eec8a3eb45d5d3f42dce349 /config/config.go | |
parent | a1a549cb1e10d18e071695249b995e2dddfdac2a (diff) | |
download | aerc-54a0a377e03074a27d7d9e84092487c55761b510.tar.gz |
threads: debounce client-side thread building
Debounce client-side thread building in the message store. Debouncing is
useful when multiple messages are loaded, i.e. when scrolling with
PgUp/PgDown.
Without the debouncing, all client-side threads will be built everytime
the message store is updated which creates a noticable lag in the
message list ui when client-side threading is activated.
The default debouncing delay can be changed by changing
'client-threads-delay' in the UI config section.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'config/config.go')
-rw-r--r-- | config/config.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/config/config.go b/config/config.go index 6a8be10e..233f2e0d 100644 --- a/config/config.go +++ b/config/config.go @@ -48,6 +48,7 @@ type UIConfig struct { MouseEnabled bool `ini:"mouse-enabled"` ThreadingEnabled bool `ini:"threading-enabled"` ForceClientThreads bool `ini:"force-client-threads"` + ClientThreadsDelay time.Duration `ini:"client-threads-delay"` FuzzyComplete bool `ini:"fuzzy-complete"` NewMessageBell bool `ini:"new-message-bell"` Spinner string `ini:"spinner"` @@ -712,6 +713,7 @@ func LoadConfigFromFile(root *string) (*AercConfig, error) { EmptyMessage: "(no messages)", EmptyDirlist: "(no folders)", MouseEnabled: false, + ClientThreadsDelay: 50 * time.Millisecond, NewMessageBell: true, FuzzyComplete: false, Spinner: "[..] , [..] , [..] , [..] , [..], [..] , [..] , [..] ", |