aerc/widgets
Tim Culverhouse 4240f1fbfd perf: reduce calls to GetUiConfig
GetUiConfig was being called many times, and came up as a high CPU user
in a cpuprofile. Every call would merge a UIConfig, which is a costly
operation. Ideally, we would only need to have a config for every
account X every directory. We also have a context for subjects. This
patch stores all FOLDER and ACCOUNT level configs and reuses those
merged objects. The SUBJECT contexts are not stored in favor of merging
on-the-go, with a TODO comment to deprecate that feature and implement a
better per-message styling option. I suspect this feature is not used
very much.

Before applying this patch with my setup, GetUiConfig is called 1159
times just to open aerc. After applying, this is reduced to 37.

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
2022-07-03 21:32:24 +02:00
..
account-wizard.go uiconfig: use pointer references to uiConfig 2022-07-03 21:32:18 +02:00
account.go perf: reduce calls to GetUiConfig 2022-07-03 21:32:24 +02:00
aerc.go uiconfig: use pointer references to uiConfig 2022-07-03 21:32:18 +02:00
authinfo.go uiconfig: use pointer references to uiConfig 2022-07-03 21:32:18 +02:00
common.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
compose.go uiconfig: use pointer references to uiConfig 2022-07-03 21:32:18 +02:00
dirlist.go perf: reduce calls to GetUiConfig 2022-07-03 21:32:24 +02:00
dirtree.go dirlist: fix panic when disconnecting with dirlist-tree=false 2022-06-07 18:01:25 +02:00
exline.go uiconfig: use pointer references to uiConfig 2022-07-03 21:32:18 +02:00
getpasswd.go uiconfig: use pointer references to uiConfig 2022-07-03 21:32:18 +02:00
headerlayout.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
msglist.go perf: reduce calls to GetUiConfig 2022-07-03 21:32:24 +02:00
msgviewer.go uiconfig: use pointer references to uiConfig 2022-07-03 21:32:18 +02:00
pgpinfo.go uiconfig: use pointer references to uiConfig 2022-07-03 21:32:18 +02:00
providesmessage.go msgviewer: open http links from messages 2022-06-14 22:12:48 +02:00
scrollable.go scrollable: extract scrolling behavior for reuse 2022-03-03 21:11:05 +01:00
selector.go uiconfig: use pointer references to uiConfig 2022-07-03 21:32:18 +02:00
spinner.go logging: added a log on panic 2022-03-23 20:56:09 +01:00
status.go uiconfig: use pointer references to uiConfig 2022-07-03 21:32:18 +02:00
tabhost.go Implement style configuration. 2020-08-06 21:42:06 +02:00
terminal.go terminal: fix deadlock with finer-grained locking 2022-05-25 22:18:26 +02:00