You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deft is slow when handling a lot of notes (several others have reported the issue here). After profiling, it turns out the culprit is string-width, at least on < 29.1 Emacs and Emacs 29.1 native on MacOS (for now).
Luckily, in deft, string-width is always called to test whether a string is less wide than (at most) the window width, or to truncate a string to (at most) the window width. In other words, if we first cut the string to something reasonable small (let's use 4 times the window width to account for UTF and emoji roughly) before computing the actual width, we are good. So define
I'm also having the same slow-down problem. But it looks like deft-file-widget is part of an older version of deft, as far as I can tell. The current version uses deft-file-button. Any idea how to fix the problem for this?
Deft is slow when handling a lot of notes (several others have reported the issue here). After profiling, it turns out the culprit is
string-width
, at least on < 29.1 Emacs and Emacs 29.1 native on MacOS (for now).Luckily, in deft,
string-width
is always called to test whether a string is less wide than (at most) the window width, or to truncate a string to (at most) the window width. In other words, if we first cut the string to something reasonable small (let's use 4 times the window width to account for UTF and emoji roughly) before computing the actual width, we are good. So defineAnd use
deft-truncate-string-to-width
instead oftruncate-string-to-width
indeft-file-widget
.(More info here)
The text was updated successfully, but these errors were encountered: