Open maxecharel opened 2 years ago
I don't think this is a pdf-tools
problem. This is not to say that pdf-tools
doesn't leak / accumulate memory (it does), but I don't think that there is any reason it should affect switching buffers. Have you installed some advice around buffer switching as part of your configuration that might be causing this? Try and re-start your Emacs with only pdf-tools
and ivy
loaded to see if you still hit the problem.
I'll profile / perf-check this a bit when I get the chance.
I can not confirm this issue, when using the same software versions and Linux.
What OS are you using?
I use ivy
, counsel
, ivy-prescient
(to get most used suggested first) and ivy-rich
(to provide additional info about items). OS: Kubuntu 22.04
I disabled ivy-prescient
and ivy-rich
and the performance issue seems to have disappeared. I will definitely confirm that later on (and will also try to identify which one of the two is critical here) but still I do not understand why I only encountered this issue with pdf-tools
buffers.
Edit: the problem seems to come from ivy-rich
, and apparently is particularly acute when called from a pdf-tools
buffer, for an unknown reason. What I do not understand is the fact that ivy-rich
appears nowhere in the profiler report.
I just realize I told complete crap, ivy-rich
does appear in the first profiler report, but not in the second.
(pdf-tools: Melpa, 20220619.2227; Emacs: 28.1) When I try to switch buffer (using
M-x ivy-switch-buffer
) from an active pdf-tools buffer, the popup with the completion framework takes ages to open (same to select the buffer I want to switch to) and emacs freezes. Since I only encountered this problem with pdf-tools, I've considered that it was a pdf-tools rather than an ivy bug, but I may be wrong. Here are two profiler reports (one as text, other as screenshot):(@vedang thx for continuing the work of politza)