editors

Discussion about all editors used for Clojure/ClojureScript
erichmond 2015-09-04T15:43:44.000043Z

@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?

erichmond 2015-09-04T15:44:48.000044Z

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

cfleming 2015-09-04T15:45:05.000045Z

@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.

erichmond 2015-09-04T15:45:16.000046Z

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

cfleming 2015-09-04T15:45:21.000047Z

Do you have soft wrap on?

erichmond 2015-09-04T15:45:21.000048Z

Ok

erichmond 2015-09-04T15:45:26.000049Z

Yes, I do

erichmond 2015-09-04T15:45:33.000050Z

sorry, I explained my issue horrible 😞

erichmond 2015-09-04T15:45:37.000051Z

horribly*

cfleming 2015-09-04T15:45:47.000052Z

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

erichmond 2015-09-04T15:45:49.000053Z

<— needs to think before he types

erichmond 2015-09-04T15:45:50.000054Z

aha

erichmond 2015-09-04T15:45:50.000055Z

ok

erichmond 2015-09-04T15:45:59.000056Z

I will try turning off soft wraps

cfleming 2015-09-04T15:46:13.000057Z

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

erichmond 2015-09-04T15:48:05.000058Z

Sure!

erichmond 2015-09-04T15:52:14.000059Z

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.

erichmond 2015-09-04T15:52:18.000060Z

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.

erichmond 2015-09-04T15:52:27.000061Z

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.

erichmond 2015-09-04T15:52:38.000062Z

s/being/could be/

erichmond 2015-09-04T15:52:43.000063Z

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

cfleming 2015-09-04T15:55:05.000064Z

@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.

erichmond 2015-09-04T15:55:45.000065Z

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

cfleming 2015-09-04T17:42:43.000066Z

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

erichmond 2015-09-04T18:57:13.000067Z

@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

erichmond 2015-09-04T18:57:41.000068Z

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

cfleming 2015-09-04T18:57:49.000069Z

How large is ridiculously large?

erichmond 2015-09-04T19:00:28.000070Z

About 25MB give or take a few MB COUGH

erichmond 2015-09-04T19:00:39.000071Z

smells the air … smells like user error

erichmond 2015-09-04T19:00:42.000072Z

heh

cfleming 2015-09-04T19:01:59.000073Z

Problem exists between chair and keyboard?

erichmond 2015-09-04T19:06:40.000074Z

exactly

jcsims 2015-09-04T22:18:53.000075Z

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