Fork me on GitHub
#editors
<
2015-09-04
>
erichmond15:09:44

@cfleming: quick question. Sometimes the REPL slows way down, often when spooling lots of information to the repl window. Do you know what the technical reason is for that? Does the REPL not release the memory allocated for spooling the data to the screen?

erichmond15:09:48

meaning, would not printing things fix this issue? or is it more related to mapping over very large lists (30-50k records)

cfleming15:09:05

@erichmond: I’m not sure, I haven’t seen that. One problem I’ve had recently is that some of the regexes used for the stacktrace folding were very prone to backtracking, I’m planning to fix that soon.

erichmond15:09:16

a REPL fired up from the terminal doesn’t seem to have these same constraints

cfleming15:09:21

Do you have soft wrap on?

erichmond15:09:33

sorry, I explained my issue horrible 😞

cfleming15:09:47

Hmm, so several people have reported that soft wrapping slows things down a lot.

erichmond15:09:49

<— needs to think before he types

erichmond15:09:59

I will try turning off soft wraps

cfleming15:09:13

Could you try without that enabled and see if it helps? Everything will be unreadable obviously, but just to test.

erichmond15:09:14

Also, to reframe my question into something MUCH clearer. The issue I am seeing is that I am mapping over 30-50k records, and printing out some checkpoint info (doing an ETL). If I do this in a normal repl fired up via the terminal, outside of IntelliJ+Cursive, this process runs fine.

erichmond15:09:18

When I try doing this inside IntelliJ+Cursive while using a remote REPL (my app is running on a vagrant VM, so I am remotely connecting to a headless REPL running in vagrant), execution eventually slows and essentially freezes, causing the editor to beachball, at which point I need to force quit IntelliJ and restart.

erichmond15:09:27

I was curious if you had seen this behavior before, as I could imagine it being a number of issues: 1) all the printing to the REPL is causing some kind of memory issue 2) realizing a seq that large is messing with the REPL 3) Sending that much data over a remote REPL is causing the slowdown.

erichmond15:09:38

s/being/could be/

erichmond15:09:43

Anyway, I will test without soft-wrapping. Thanks again!

cfleming15:09:05

@erichmond: Thanks for the clarification. I’ll see what I can come up with to test this. I might be able to use test.check generators to generate a ton of random data structures, print them out and see what happens.

erichmond15:09:45

I’m jammed up having to get this ETL done by today, but once it’s done, I can also go back and futz around

cfleming17:09:43

@erichmond: No problem, I’m travelling at the moment anyway

erichmond18:09:13

@cfleming: I was able to play around with this more. It turns out the issue is writing a ridiculously large string to the REPL will cause the REPL to slow down. If I then run the “clear repl” command, the REPL speeds up again

erichmond18:09:41

that actually makes sense to me, and is pretty easy to fix on my end (don’t return ridiculously large strings) heh.

cfleming18:09:49

How large is ridiculously large?

erichmond19:09:28

About 25MB give or take a few MB COUGH

erichmond19:09:39

smells the air … smells like user error

cfleming19:09:59

Problem exists between chair and keyboard?

jcsims22:09:53

hehe yeah the same problem will happen in emacs if you do that >_>, or most any text editor, I’d imagine