Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

bug: Seems to cause Lag over ssh #45

Closed
MrNavaStar opened this issue Jun 29, 2024 · 5 comments
Closed

bug: Seems to cause Lag over ssh #45

MrNavaStar opened this issue Jun 29, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@MrNavaStar
Copy link

MrNavaStar commented Jun 29, 2024

Neovim version (nvim -v)

0.10.0

Operating system

Linux, Fedora 40

Terminal emulator / GUI

Gnome Terminal

Describe the bug

when using nvim with this plugin over an ssh connection nvim becomes quite slow and laggy, regardless if a markdown file is open or not. Disabling the plugin makes the issue go away.

Expected behavior

no lag

Additional information

No response

@MrNavaStar MrNavaStar added the bug Something isn't working label Jun 29, 2024
@MeanderingProgrammer
Copy link
Owner

Thanks for brining this up, that's definitely interesting.

Outside of markdown files this plugin does listen to a fair number of events: ModeChanged, WinResized, FileChangedShellPost, FileType, & TextChanged.

The main problem here is likely the usage of the TextChanged event, I'll see if I can remove the need for this. Will update shortly!

@MeanderingProgrammer
Copy link
Owner

I've pushed a pretty substantial refactor to how auto commands are setup: 14b3a01.

This keeps only the FileType / WinResized as auto commands that run globally. Everything else is setup at a buffer level and only on markdown buffers, which should remove most of the background performance penalty.

Would you mind updating the plugin and letting me know if the performance is better? I'm super curious!

@MrNavaStar
Copy link
Author

I'll give it a shot later today!

@MrNavaStar
Copy link
Author

As far as I can tell the lag is gone! Thanks so much!

@MeanderingProgrammer
Copy link
Owner

Awesome, glad it's working!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants