dccsillag / magma-nvim

Interact with Jupyter from NeoVim.
GNU General Public License v3.0
977 stars 49 forks source link

[Bug] When I start Magma my neovim starts stuttering #86

Closed marcotduenas closed 1 year ago

marcotduenas commented 1 year ago

When I type MagmaInit my enitre neovim starts to stutter. When I stop Magma, Neovim returns to normal

schmidma commented 1 year ago

Have you been able to solve the problem? I experience the same issue. As soon as calling MagmaInit the entire neovim session is nearly unresponsive and stuttering extremely (key input delay of multiple seconds).

schmidma commented 1 year ago

It seems this timer https://github.com/dccsillag/magma-nvim/blob/395b48e2e202d82fca76c15d2dcd8785c125d686/rplugin/python3/magma/__init__.py#L56

blocks the entire neovim UI and only if the timer triggers, neovim proceeds with any updates of key presses etc.

marcotduenas commented 1 year ago

Have you been able to solve the problem? I experience the same issue. As soon as calling MagmaInit the entire neovim session is nearly unresponsive and stuttering extremely (key input delay of multiple seconds).

I didn't figure out the problem yet, been using emacs last month

marcotduenas commented 1 year ago

It seems this timer

https://github.com/dccsillag/magma-nvim/blob/395b48e2e202d82fca76c15d2dcd8785c125d686/rplugin/python3/magma/__init__.py#L56

blocks the entire neovim UI and only if the timer triggers, neovim proceeds with any updates of key presses etc.

Did it resolve for you?

schmidma commented 1 year ago

I didn't further investigate the exact packages or dependencies. But after installing some (missing ?) jupyter packages, the stuttering disappeared. As I said, just guessing, but Magma might be not initializing correctly and retrying? Which causes the delay.

marcotduenas commented 1 year ago

I didn't further investigate the exact packages or dependencies. But after installing some (missing ?) jupyter packages, the stuttering disappeared. As I said, just guessing, but Magma might be not initializing correctly and retrying? Which causes the delay.

Could send me the packages that you've installed? So I can test in my machine

schmidma commented 1 year ago

I think the initial package was plotly (installed via dnf on fedora with python3-plotly), which of course is not the cause, but any of its dependencies. It might be python-jupyter-filesystem which mainly setups the directory structures for other modules. Maybe there is a possibility to get better logging during the initialization phase to track whether any kernel initialization or similar procedures fail.

WhiteBlackGoose commented 1 year ago

Does this reproduce on the newest neovim? Also which terminal was it, which were the packages that fixed it?

I'm gonna close it for now, but if someone hits this issue we will see