Fork me on GitHub
#cursive
<
2024-06-10
>
tony.kay01:06:42

I was using the latest EAP and I hit a bug that looped hard and emitted exceptions. The REPL consumed all available CPU, and the IDE became unresponsive. I downgraded to the non-EAP, and when I hit that same bug in my code scrolling is WAY faster and it is better in terms of the IDE not crapping out. I noticed that there’s an attempt to decide when to auto-scroll now (the button controlling scroll on output is gone in the EAP)…I found that change both helpful and annoying. I’d actually still like the option to choose…but anyway, I think perhaps the new code for scrolling is somehow WAY more CPU intensive.

cfleming04:06:22

Hmm, that’s unfortunate. The scrolling button regression is fixed for the next EAP (https://github.com/cursive-ide/cursive/issues/2911), but the performance is a shame. I had hoped it would be an improvement, and I’ve had one report that it seemed faster, but I haven’t had a chance to properly test it yet.

onetom13:06:28

The new REPL panel is definitely an immense performance improvement when it comes to printing a single value, which is thousands of lines long. If u flood the REPL with output and that affects the scroll speed, that’s unfortunate, but it’s not a common mode of operation IMHO. What might help though in the meantime, if u reduce the scrollback buffer line count.

octahedrion07:06:50

If you evaluate (cycle [1]) and then click "Interrupt Current Evaluation" it says "Evaluation interrupted." and it appears as though it is, but there will nonetheless be a java process taking >100% CPU which when force quitted closes the REPL, so I don't think "Interrupt Current Evaluation" necessarily works.

cfleming07:06:10

Which JVM version are you using? Recent versions have deprecated and finally removed Thread.stop(), which this uses under the hood. There’s a bunch of discussion and a proposed new solution for nREPL here: https://github.com/nrepl/nrepl/issues/296

octahedrion09:06:44

openjdk-21.0.1 I just tried with openjdk-19.0.2 and indeed it does stop

octahedrion09:06:20

will adding :jvm-opts ["-Djdk.attach.allowAttachSelf"]to a deps alias sort it out ?

cfleming20:06:26

If you’re using nREPL 1.2.0, which is still in beta I think.

cfleming20:06:59

I believe that should work but haven’t had time to test it yet, I’d be interested in any experience reports.