Fork me on GitHub
#cider
<
2019-04-04
>
yuhan02:04:32

bumping my previous question here about Cider debugger:

yuhan02:04:38

how do I prevent the cider debugger from trying to fully realize lazy sequences?

(let [n 5]
  #dbg
  (take (inc n) (repeat n)))
this hangs indefinitely trying to evaluate (repeat n) whereas eg. cider-eval on an infinite sequence doesn't have that issue

bozhidar05:04:52

@qythium I’ll have to take a look at the code to be sure, but I assume the debugger might be doing a sync eval would be stuck forever once the result starts coming.

yuhan07:04:27

Thanks, I thought it might be something obvious I was missing, but it sounds more like a bug - will file an issue on the Cider repo sometime later 🙂

bozhidar05:04:01

@malabarba would know better if he’s around.

bozhidar05:04:16

> @frozenlock just a note that I haven’t seen pretty printing working in shadow-cljs

bozhidar05:04:16

@richiardiandrea But the printing logic is independent from ClojureScript, so I can’t imagine how this won’t be working. We get the value from ClojureScript, but we pretty-print it in Clojure.

bozhidar05:04:35

If there’s really some problem with this someone should file a ticket.

richiardiandrea15:04:34

Ok i quali try to take the time and do it

alexyakushev09:04:34

cider-nrepl's stacktrace op has became freakishly slow.

alexyakushev09:04:59

Some stacktraces take as long as 5-10 seconds to render.

alexyakushev09:04:39

I profiled it to discover that most cost is paid for resolving each frame to a Java class/method.

alexyakushev09:04:52

Is this all really necessary, or is it possible to cut down some of that?

bozhidar09:04:31

@alexyakushev I don’t remember to be honest. We have barely touched it since it’s initial version. And I don’t recall any recent changes that’s why I’m puzzled by your observation that it has suddenly become very slow.

alexyakushev09:04:22

Digging deeper, looks like it is connected to the fact this is a Java/Clojure project, and orchard has some special rules to when not to cache internal Java classes.

alexyakushev09:04:26

I have many internal classes on the stacktrace, and they are being parsed over and over.

alexyakushev09:04:36

I'll try to do something about this case

bozhidar09:04:04

I was just about to cut a new Orchard release, so now is a good time to tackle this.

bozhidar09:04:34

I have no memory of why we decided to handle the internal classes differently.

alexyakushev10:04:57

By the way, that could be the reason why my tests were hanging the other day.

alexyakushev10:04:31

The tests were failing with exceptions and there were ~100 of them, so CIDER was probably busy rendering the stacktraces.

bozhidar10:04:09

@alexyakushev Check out the new cider-nrepl snapshot.

alexyakushev21:04:29

Yes, thanks, seems to be working.

alexyakushev21:04:35

I finally had to restart the REPL 🙂