Closed bhargavkulk closed 10 months ago
I'm sorry to hear that and ready to work on it.
Can you please tell me more about what kinds of things are significantly slower for you?
If you visit a .rkt
file, is it slow to load? Is typing slow?
If so: Are you using classic racket-mode
or the experimental new racket-hash-lang-mode
?
If you're using racket-xp-mode
in the edit buffer, does disabling it make a difference? (Your details say it's disabled, but I'm just asking to be sure.)
Is it slow when you run a program?
If so: Can you say more about how/when it's slow? When you first run? Is it slow to display output? Is the REPL buffer slow to accept your typing, submit expressions, and/or show you values?
Anything else? I'm not asking for an exhaustive inventory. In fact, the simplest example where you first notice something to be slower, would be a good place to start.
Hi
.rkt
file, is it slow to load? Is typing slow?
racket-hash-lang-mode
.racket-xp-mode
in the edit buffer, does disabling it make a difference? (Your details say it's disabled, but I'm just asking to be sure.
I think the main issue I am having is the significant slowdown while typing or navigating through a racket file. Thanks for the help!
Thanks! That starts to narrow it down.
Hmm... I'm surprised. The classic racket-mode
for editing files hasn't changed much recently. (Whereas racket-repl-mode
for the REPL has changed significantly; I would have thought a slowdown with that would be more likely.)
But clearly something has changed. Presumably on my end in racket-mode
, not in your setup.
Question: Do you recall how long ago was the previous version of Racket Mode you'd used, where it was still OK?
(If you have a rough idea, that might help me narrow down how far back to look in the history. Although since no one else has reported anything like this, yet, maybe it's quite recent.)
Even when I try my usual "torture test" file, the nearly 5000 line class-internal.rkt
from Racket's source, the file loads "instantly" for me. Navigating and making changes are quick, as usual, whether near the start or end of the file.
Question: Are you seeing this slowdown even with small files? Even as tiny as say:
#lang racket/base
42
No I am only seeing slowdown with large files. The file I am currently editing has 294 lines.
Actually I am seeing slowdown for small files too.
Do you recall roughly when your previous version of Racket Mode was from?
(One way to answer that might be: If you look in ~/.emacs.d/elpa
, you might see multiple folders named racket-mode-*
. What are the names?)
Also, when you are in a slow edit buffer, try M-x racket-xp-mode
. Does the message say the mode was disabled? If so, is the performance better?
Do you recall roughly when your previous version of Racket Mode was from?
(One way to answer that might be: If you look in ~/.emacs.d/elpa, you might see multiple folders named racket-mode-*. What are the names?)
I only see the latest version of racket-mode (which is 20231130.1652
) in the elpa
directory. If I recall correctly, I started using emacs to edit racket code about a month and half ago, maybe even two months ago.
Also, when you are in a slow edit buffer, try M-x racket-xp-mode. Does the message say the mode was disabled? If so, is the performance better?
No, the mode is not enabled, and when I do enable it I don't see any improvement in performance.
Thank you for patiently answering so many questions.
You led me to improve the M-x racket-bug-report
feature.
My request:
Please wait for the newest version to show up on MELPA or NonGNU ELPA. I don't know which one you get it from (or even whether you know). Anyway, as I write this, neither one has updated yet.
But by tomorrow, if you M-x package-refresh-contents
, then M-x list-packages
, you should see a version of the Racket Mode package later than "20231201.1736" (MELPA) or "racket-mode-1.0.20231130.115215.tar" (NonGNU ELPA).
Please install that. And for belt+suspenders, please restart Emacs.
Please do M-x racket-bug-report
-- while you're in a racket-mode
edit buffer where things are slow.
Please paste that here in a new comment.
This should show me exactly which minor modes you have enabled in the slow racket-mode
buffer, as well as some of the "hooks" and other variables they may have changed in that buffer.
Because most likely the slowdown is due to one of them interacting with Racket Mode. (If so, I need to know which one to make progress.)
I've already tried some modes from your old "Details" above, but so far can't reproduce any slowdown. So I'd like to get some better quality data, and try again.
Alright, will do that! Thanks for being patient with me :smile:
That newer version has now flowed through to both:
20231201.2128
).racket-mode-1.0.20231201.162829.tar
).So regardless of which repo you get it from, M-x package-refresh-contents
, then M-x list-packages
should show the newer version now.
I still want to figure this out. I'll dig into the new data whenever you have a chance to...
Please install latest Racket Mode. (Afterwards, please restart Emacs.)
Please do M-x racket-bug-report
-- while you're in a racket-mode
edit buffer where things are slow.
Please paste that here in a new comment.
Hi, sorry for the late response. The laptop I was using till now has stopped working, which I can't reproduce this bug anymore. racket-mode
is working perfectly on my new laptop! I think we can blame this on my ailing laptop and close this issue!
I'm sorry to hear about the laptop failure; that sucks. On the other hand, congratulations on your new laptop!
This issue did result in me taking a fresh look at the bug-report data, and improving it, which hopefully will help for some other issue someday.
Hi, I updated my
racket-mode
to the latest version, and I am now seeing significant slowdowns. I am not really sure what is causing this.