Fork me on GitHub
#spacemacs
<
2017-12-07
>
michaellindon02:12:25

my repl in spacemacs is rather slow and laggy, is this a common observation? This particularly happens when the repl has printed some large output. Is there a way to speed this up like turn off autocompletion for the repl?

ag03:12:23

which repl are you talking about?

Sam H10:12:36

I find that happens too. Usually I just do cider-repl-clear-buffer (`SPC m s c`) but that doesn’t really help if you want to keep the output

practicalli-johnny14:12:37

You can limit the output in the REPL to x many lines (sorry, on a slow network, so havent googled it)

michaellindon15:12:17

i think both of these are useful suggestions, thanks

vuuvi15:12:29

there was also a similar thread further up in the chat about this problem FWIW

mccraigmccraig10:12:08

assuming you are talking about a clj or cljs repl @michaellindon - if you find something i would love to know about it too 😬

practicalli-johnny14:12:15

@petr @eggsyntax there is a paste-transient-state in the develop branch of Spacemacs that allows you to traverse the kill ring. This was poping up a little menu when ever you pasted, allowing you to navigate through the kill ring with p and P

practicalli-johnny14:12:30

@naomarik I do use yasnippets, but then I tend to tab out to the end $0 before doing anything that benefits from smartparens. I have a couple of posts on how I use it, although they don't address this specific issue directly http://jr0cket.co.uk/tags/yasnippets/

eggsyntax14:12:21

@michaellindon there are loads of things that you can try that might speed it up, but the best strategy is usually to start with the emacs profiler. It's surprisingly easy to use, and can often let you quickly narrow down to the thing that's causing the problem. Pretty much all the info you need is on this short page: https://www.gnu.org/software/emacs/manual/html_node/elisp/Profiling.html

jeff.terrell14:12:31

Also, I suppose you might get help on #cider @michaellindon.

michaellindon15:12:23

Thanks for all the suggestions, I'm experimenting a few things this morning

michaellindon15:12:39

So far, turning off company mode for the repl (clojure) has helped in addition to @shan's suggestion of clearing the buffer with (SPC m s c), things typically slow down when there is a lot of output for me

michaellindon15:12:56

for example, if you generate 10000 random uniforms and the repl prints them out, entering commands and getting output becomes a lot slower after that

michaellindon15:12:21

I generated an even larger number and I never got the prompt back to enter the next input. I cleared the buffer, the prompt came back immediately

eggsyntax16:12:15

@michaellindon quick & dirty way to catch whatever it is when that happens: M-x toggle-debug-on-quit Then repro the issue so you don't have the prompt, hit C-g to interrupt, and boom, you'll get the call stack for what's happening at the point you interrupt. https://emacs.stackexchange.com/a/4024

michaellindon18:12:11

Awesome, thanks :)

naomarik23:12:53

@jr0cket yeah looks like some incompatibility between smartparens and yasnippet. i forced enabled it and it throws in extraneous characters when you expand a snippet in some cases.