micro-editor / micro-editor/micro
Slow startup on WSL with default config
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 29.6k
- Forks
- 1.4k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 10
Description
Description
Launching micro in WSL takes ~1 second for me before the main UI appears.
I checked out master and manually added timing points. All the time is spent here: https://github.com/micro-editor/micro/blob/393cf24858e63ba75af1480b618d2e3add5b9e3e/cmd/micro/micro.go#L386
When I add timing points to break down each clipboard option, I get
2026/09/05 00:24:27 Type init: *clipper.Custom
2026/09/05 00:24:28 Time to init fail: 126.397986ms
2026/09/05 00:24:28 Type init: *clipper.Wayland
2026/09/05 00:24:28 Time to init fail: 126.933187ms
2026/09/05 00:24:28 Type init: *clipper.Xclip
2026/09/05 00:24:28 Time to init fail: 126.090087ms
2026/09/05 00:24:28 Type init: *clipper.Xsel
2026/09/05 00:24:28 Time to init fail: 124.130887ms
2026/09/05 00:24:28 Type init: *clipper.Wsl
2026/09/05 00:24:28 Time to init succeed: 381.408161ms
My understanding is that resolving non-existent commands is slow in WSL because it needs to check all the Windows paths. The ~120ms matches what I get when executing time which noexist.
I have 43 Windows entries in my PATH which might be higher than average? because I install a lot of tools through winget and each one gets its own path entry when installed that way.
I tested manually creating a micro-clip script and adding it to my first path entry (Linux folder) so micro doesn't need to try every other clip option in the list and with that, micro starts up instantly. Only later did I realize micro allows setting "clipboard": "terminal" in the config to use OSC 52 which will bypass all of this logic and works perfectly in Windows Terminal.
I think others might run into this issue as well and it might be beneficial to:
- Mention
clipboard": "terminal"in the README in the https://github.com/micro-editor/MICRO#wsl-and-windows-console section (will also help with https://github.com/micro-editor/micro/issues/1365). Out of curiosity, I checked what https://github.com/microsoft/edit does and it appears like they only support OSC 52, falling back to an internal buffer for copying/pasting when OSC 52 is not supported. - Make UI startup time not synchronously blocked by clipboard initialization? Not totally sure if okay, it's possible to type while the UI is still loading.
Environment
- Version: 2.0.15
- OS: Arch Linux (via WSL)
- Terminal: Windows Terminal
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at cmd/micro/micro.go around line 386 and inspect the synchronous clipboard initialization described in the issue. Then review the README’s “WSL and Windows Console” section and the existing "clipboard": "terminal" configuration. Done should be defined by maintainers: document the OSC 52 workaround, address the startup delay, or clarify which scope is intended and verify WSL startup behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, performance
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100