How to diagnose an issue with slowness #2577
-
Hello all, I am trying to diagnose an issue where helm responds slowly but I am having trouble making progress. If any one knows other ways to diagnose these, I would appreciate. Here is what I know so far.
I tried to run the profiler but I don't seem to bet getting any useful output from that. Any advise on how to dig through this? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 11 comments 14 replies
-
sturgman ***@***.***> writes:
Hello all,
I am trying to diagnose an issue where helm responds slowly but I am having trouble making progress. If any one knows other ways to diagnose these, I would appreciate. Here is what I know
so far.
1. Slowness happens only in an auctex buffer
2. It does not happens when point is after a closing curly brace,
square bracket, or parenthesis
Can you tell what do you have exactly under point.
Are you using the latest Helm?
…--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
sturgman ***@***.***> writes:
To your other question, I am using:
help :: 20221117.1800 from Melpa
auctex :: 13.1.6 from Melpa
I'll check if there is an update and report back.
Last commit is from 07/12/2022.
I tried to reproduce and couldn't, I experiment no slowness here (from Emacs-28.2).
… —
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.*Message ID: ***@***.***>
--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
Just in case anyone else experience this. The problem has something to do with Windows and launching emacs as daemon from a shortcut link. I figured this out while bisecting my init file to see if any specific configuration was the issue (it was not). So... if I launch |
Beta Was this translation helpful? Give feedback.
-
sturgman ***@***.***> writes:
Just in case anyone else experience this. The problem has something to do with Windows and launching emacs as daemon from a shortcut link. I figured this out while bisecting my init file
to see if any specific configuration was the issue (it was not).
So... if I launch runemacs --daemon from a windows link, I see the
slowness. If I launch runemacs --daemon from a terminal window I see
no slowness. Probably too niche an issue to diagnose further but
wanted to document it here.
Thanks for this information, it will be useful for others.
Unfortunately I can't reproduce as I have no Windows box to test on.
… —
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.*Message ID: ***@***.***>
--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
sturgman ***@***.***> writes:
I should say that I suspect there is something wrong with my overall
config (although I have something pretty much identical in my other pc
without problems) and not with helm itself. Mainly looking for advice
on how to continue to troubleshoot. A question I have is whether there
is something inherently different between helm-M-x and
helm-find-files. Do these two commands operate in fundamentally
different ways?
Not really, I am surprized this happen more with helm-M-x because this
one doesn't look at what is at point whereas helm-find-files is looking
to what is at point.
… —
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.*Message ID: ***@***.***>
--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
Actually, I am having the exact same issue here on windows and it seems unrelated to being launched as a daemon or as a normal instance. I posted on reddit since I did not know how to debug this. |
Beta Was this translation helpful? Give feedback.
-
Gennady Uraltsev ***@***.***> writes:
Actually, I am having the exact same issue here on windows and it
seems unrelated to being launched as a daemon or as a normal
instance. I posted on reddit since I did not know how to debug this.
Do you experiment this only from a tex buffer or everywhere once auctex
has been loaded?
…--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
Gennady Uraltsev ***@***.***> writes:
Only in tex buffers (where auctex is activated automatically). I'll
try to enable it in other buffers and see what happens
Could you try in a simple text-mode or fundamental-mode buffer with the
same text you have at point in the tex buffer?
…
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.*Message ID: ***@***.***>
--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
The slowdown happens when I have the MikTex installation in the path. I reproduce like this:
Slow down not observed
A third experiment:
|
Beta Was this translation helpful? Give feedback.
-
As shown in the above images, it's because Unfortunately, I don't know enough related details to come out with a proper fix, but I wonder why |
Beta Was this translation helpful? Give feedback.
-
Zhexuan Chen ***@***.***> writes:
image
image
As shown in the above images, it's because ffap-latex-mode is slow,
the reason it's it calls the external program kpsewhich by
call-process. Comment out the expression (apply # 'call-process ...)
and helm-M-x will retain normal performance.
Thanks to catch this.
Unfortunately, I don't know enough related details to come out with a
fix, but I wonder why helm-fuzzy-highlight-matches need to call
helm-guess-filename-at-point even within the command helm-M-x which
seems not related to filenames.
helm-fuzzy-highlight-matches needs to know if the source called is
completing file names or not. helm-guess-filename-at-point was one
option to know this, unfortunately there is problems with ffap as
always, so I have disabled this check.
…
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.*Message ID: ***@***.***>
--
Thierry
|
Beta Was this translation helpful? Give feedback.
As shown in the above images, it's because
ffap-latex-mode
is slow, the reason it's it calls the external programkpsewhich
bycall-process
. Comment out the expression(apply #'call-process ...)
and reevaluate the(defun ffap-latex-mode ...)
, thenhelm-M-x
will retain normal performance.Unfortunately, I don't know enough related details to come out with a proper fix, but I wonder why
helm-fuzzy-highlight-matches
need to callhelm-guess-filename-at-point
even within the commandhelm-M-x
which seems not related to filenames.