-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Extremely slow once kernel is active #27
Comments
@Thesola10 if I had to guess this is the same issue that I described here. I'm not 100% on that. If you could provide more information about how you're installing python deps and the jupyter kernel kernel, that could help out. In the meantime I can take a look at the section of code pointed out in that issue. Another thing that you could do is run the |
Indeed my Neovim setup is provided through Nix, while my Jupyter kernels are installed system-wide from Arch repos. Is there a way this situation could be detected and an error message shown? I'll try and upgrade my Nix Neovim's Python to 3.11 to match my system-wide Arch Python |
My broken kernel is failing to be ready over and over again. I'm still not sure why it's causing the editor to lag out. Molten only checks if it's ready twice a second, and doesn't wait on the kernel to be ready. I think this could definitely use a "max_tries" or something so that it will at least eventually error out. But the editor would still be lagging while we wait, normal kernels can take a decent amount of time to start up (although they don't lag the editor). |
Do you have any working kernels currently? |
Kernels that don't use Python as a host executable work. |
Correction: only non-Python kernel hosts work. Nix breaks a lot of Python's functionality, and I suppose it doesn't look into the default PYTHONPATH. |
Okay, I can at least help you get a python kernel running b/c I'm using nix, and it's working for me. Probably the easiest way to do this would be, to use the One important thing to note:
I'm really new to nix, so I'm not the best for explaining why this works. |
Does this mean that you installed them with the arch package manager instead of with the python command mentioned above? That could be the problem, although I'm not sure why it doesn't work |
You can check out my current Neovim config over here, but in the mean time, I appreciate the help I think I can just add an option to load Arch's Python as the default runtime even through the Nix package. |
One more thing to check out if that doesn't work: dccsillag/magma-nvim#69 You can spawn the kernel in a separate terminal, and attach to it the way that's mentioned in the PR (I haven't tried this, but it should still work). I really should document that, I didn't realize that it was a thing until I stumbled across it last night while looking through magma issues that I'd like to fix/implement in molten. Definitely leave an update if/when you find a solution. I'm planning to write a nix(os) wiki page b/c there is certainly some jank there. |
I am experiencing this bug too. This is a serious bug, it make the whole nvim session freeze, adds an increasing latency that grows from about 1s to 10s before each keystroke, it even freeze my desktop (KDE Plasma) once, seems that there is an infinite loop somewhere. Here is my |
This seems to happen when the kernel is installed in a certain way. Not sure what way that is, but installing into a virtual environment the way the docs suggest seem to work reliably. If you want a quick fix you could try to just follow those. I would still like to figure this issue out though. If you could include as many details as possible about your setup that might help. Information like, OS, how you installed python, the version of python, version of ipykernel, how you installed the jupyter kernel, does the kernel work in jupyter lab (I suspect that it will, I have a kernel that causes this issue and it works fine in jupyter lab for me). and any other details you might think are relevant. It seems like this wasn't installed in a virtual environment, which could also be related? I'm not sure. I've been unable to recreate this issue reliably on a normal (non-nixos) machine, so a minimal repro would be really helpful if you could create one! |
Unfortunately, I can no longer reproduce the bug using a globally installed jupyter kernel. I will report here once I encounter this bug again or have found a reliable way to reproduce it on my end. |
If this is still an issue I was getting the problem when running a global Jupyter config. I recently reinstalled my iPython into a Pipx virtual environment which broke the global Jupyter installation. After reinstalling iPython back into the global config the slow down completely disappeared for me. So I am guessing the kernel could never launch in the background due to a missing dependency and kept continuously hanging the Neovim instance. |
@ddkasa could you leave the command that you used to install it globally? That could be a/the problem.. but I think that there's some way for us to handle it b/c I had a kernel that hung neovim but would work in jupyter lab. |
@benlubas It's the standard I just tested this again and it was hanging again, but Jupyter notebook/lab would work as it was sourcing another kernel from another environment. After re running I am using Pyenv to manage my Python though, so that might make it different, but that should act the same as normal installation in theory. I have my nvim python set through |
I had the same lag after |
Description
Precisely the same issue as upstream dccsillag/magma-nvim#100
The text was updated successfully, but these errors were encountered: