Skip to content
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

Slow to load editor - with or without file #1841

Open
ksorbo opened this issue Aug 20, 2020 · 6 comments · May be fixed by #2245
Open

Slow to load editor - with or without file #1841

ksorbo opened this issue Aug 20, 2020 · 6 comments · May be fixed by #2245

Comments

@ksorbo
Copy link

ksorbo commented Aug 20, 2020

Description of the problem or steps to reproduce

It takes 6 seconds to load the program, with or without any file.
Used to using nano which loads in less than a second on my server
It would be nice to have a replacement for nano, but most of the time when I edit on ssh, I am doing multiple edit, save, exit, repeat. Is it normal to take this long for the editor to load? Is there any way to speed it up?

Specifications

Version: 2.0.6
Commit hash: 60846f5
Compiled on June 24, 2020

Commit hash:
OS: Ubuntu 20.04
Terminal: bash

@zyedidia
Copy link
Owner

zyedidia commented Aug 20, 2020

Is your server a small machine? In my experience micro generally takes 50-60ms to start up. The most costly parts of the startup are syntax highlighting, language detection, and Lua plugins, so you could try disabling these by setting the syntax option to false, filetype to off, and plugins that you don't need to false (such as autoclose, literate, linter, diff, etc...).

You can also enable fastdirty which will use a faster but less accurate way of determining whether the buffer has been modified.

@flyingfz
Copy link

try:

nano ~/.config/micro/settings.json

add or set :

{
     "clipboard": "terminal"
}

@zyedidia
Copy link
Owner

Ah that's a good point, this slowdown might be caused by micro trying to connect to the xclip server for clipboard integration. As mentioned above you can set clipboard to terminal, or internal to disable this.

@ksorbo
Copy link
Author

ksorbo commented Sep 24, 2020

I just installed 2.0.7. It starts instantly and gives the message
System clipboard not found, install xclip/xsel or change clipboard option
Your comments seem to be right on.

@horpto
Copy link

horpto commented Oct 16, 2021

I faced with this error. maybe clipboard load in background should help? (i can make a pr)

horpto pushed a commit to horpto/micro that referenced this issue Oct 16, 2021
@horpto horpto linked a pull request Oct 16, 2021 that will close this issue
@symbioid
Copy link

symbioid commented Jan 7, 2022

Want to confirm that this xclip seems to be the issue on wsl2 with no xserver running.
It was taking 32 seconds to load, without any x server.
Without editing the config, I opened GWSL xserver, and with that running, micro starts instantly...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants