Replies: 2 comments 4 replies
-
The issue is that this is tough to warn. What if it is not the loop in the cell that's slow but rather the function you call? We do talk about this on the "Welcome to Livebook" notebook, but I think it is really hard to automate/detect this. |
Beta Was this translation helpful? Give feedback.
-
Oh, indeed you do. I guess I read that a year ago and forgot. It didn't show up in any search results I tried earlier today (all of which sounded like "why is Livebook slow"). Maybe it's not rendered as HTML anywhere so the only place search engines could find that is in the .livemd on Github.
Fair enough. I guess there's no way to tell without running some profiler all the time, but that doesn't sound worth it. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm was solving Advent of Code in Livebook today and I noticed that evaluation in Livebook was much slower than in iex. Here's a simple example:
This takes about 15s in Livebook, but evaluates in less than 1s in iex.
I was going to ask about this, but then I remembered @josevalim saying in some video that code is much slower to evaluate if it isn't in a module. Indeed, putting it in a module makes it evaluate very quickly just like in iex.
I think this should be documented somewhere. Maybe there should be a warning under a cell that takes too long to evaluate or something.
Beta Was this translation helpful? Give feedback.
All reactions