Hey guys, thank you for the amazing work you’re doing here. I really appreciate it!
I recently created a kino smart cell that allows to draw excalidraw graphs in the Livebook. You can check it out at https://github.com/fahchen/kino_excalidraw. However, I’ve run into an issue where the Livebook sometimes hangs. After some investigation, I found that Livebook.Text.Delta.diff/2 takes a significant amount of time to compute, especially as increasing as the source of the smart cell grows larger. Actually, I embed the excalidraw file which is in JSON format, into the notebook. Here’s the relevant part of the code:
|
delta = Livebook.Text.Delta.diff(cell.source, source) |
I’d like to ask for your help with following:
- is this a proper way to embed the
excalidraw into the livebook notebook?
- wow can I address this issue? My current solution is to add an option to generate
Kino.nothing() as the source.
livebook-diff-issue.md (GitHub doesn’t allow uploading .livemd files, so I changed it to .md.)
Here’s an example livebook note that embeds an excalidraw graph, alternatively you can find an example from the kino_excaildraw document(https://hexdocs.pm/kino_excalidraw/components.html).
To reproduce this issue, you can open the example notebook from the above, draw a complex graph, and then Livebook will hang.
Thanks in advance for any help or suggestions.
Hey guys, thank you for the amazing work you’re doing here. I really appreciate it!
I recently created a kino smart cell that allows to draw excalidraw graphs in the Livebook. You can check it out at https://github.com/fahchen/kino_excalidraw. However, I’ve run into an issue where the Livebook sometimes hangs. After some investigation, I found that
Livebook.Text.Delta.diff/2takes a significant amount of time to compute, especially as increasing as the source of the smart cell grows larger. Actually, I embed the excalidraw file which is in JSON format, into the notebook. Here’s the relevant part of the code:livebook/lib/livebook/session.ex
Line 1792 in d3161c6
I’d like to ask for your help with following:
excalidrawinto the livebook notebook?Kino.nothing()as the source.livebook-diff-issue.md (GitHub doesn’t allow uploading .livemd files, so I changed it to .md.)
Here’s an example livebook note that embeds an excalidraw graph, alternatively you can find an example from the kino_excaildraw document(https://hexdocs.pm/kino_excalidraw/components.html).
To reproduce this issue, you can open the example notebook from the above, draw a complex graph, and then Livebook will hang.
Thanks in advance for any help or suggestions.