Slow startup on WSL with default config
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
- #4215 của @frankischilling — đã đóng, không merge
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go
- Lĩnh vực
- cli, performance
Hướng nghiên cứu
Bắt đầu tại cmd/micro/micro.go, khoảng dòng 386, và kiểm tra việc khởi tạo clipboard đồng bộ được mô tả trong issue. Sau đó xem lại mục “WSL and Windows Console” trong README và cấu hình "clipboard": "terminal" hiện có. Maintainers nên xác định thế nào là hoàn tất: ghi lại workaround OSC 52, xử lý độ trễ khi khởi động, hoặc làm rõ phạm vi dự kiến và xác minh hành vi khởi động của WSL.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Go
- Star
- 29.8k
- Fork
- 1.4k
- Merge trung bình
- 1 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của micro-editor/micro
-
feature syntax
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
micro-editor/micro#4289 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Also bind alt-click for multi-cursorsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởfeature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
micro-editor/micro#4260 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
XML syntax highlighting breaks if empty tag contains whitespace before closeCó thể đã có người làm @justadityaraj đã nhận 58 ngày trước. Đang mởbug syntax
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
micro-editor/micro#4213 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
micro-editor/micro#3553 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
syntax
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
micro-editor/micro#2969 · 3 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của micro-editor/micro
Issue tương tự
-
bug os:ios
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
hajimehoshi/ebiten#4039 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
open-telemetry/opentelemetry-go-compile-instrumentation#1713 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
JakeChampion/lang#14392 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent-butler-finding bug
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
jordansmall/spindrift#6557 ·
Maintainer thường phản hồi trong vòng 1 ngày