neomacs icon indicating copy to clipboard operation
neomacs copied to clipboard

[Bug]: Windows系统下用鼠标框选极其的卡顿

Open ZHT0711 opened this issue 2 months ago • 8 comments

Bug summary

更新18版本后出现的

Steps to reproduce

如题,就是用鼠标拖动光标

Expected behavior

No response

Neomacs --version output

0.0.18

Extra context

No response

ZHT0711 avatar Sep 14 '26 00:09 ZHT0711

Which buffer or file were you selecting text in, and which major mode was active?

Does this also happen in a small scratch buffer after starting with neomacs.exe -Q?

eval-exec avatar Sep 19 '26 16:09 eval-exec

I tried this action in "scratch" buffer text-mode Yes , I tried this through neomacs -q and it's still Laggy .

ZHT0711 avatar Sep 20 '26 11:09 ZHT0711

what's your cpu and gpu info?

eval-exec avatar Sep 20 '26 11:09 eval-exec

I use 处理器 AMD 锐龙 AI 7 H 350(Zen 5,8 核 16 线程,最高 5.0GHz) 显卡 NVIDIA GeForce RTX 5060(8GB GDDR6,110W 满功耗)

ZHT0711 avatar Sep 23 '26 07:09 ZHT0711

还增加一条 在kubuntu22.04系统下依旧最新版neomacs拖动光标卡顿

ZHT0711 avatar Oct 08 '26 13:10 ZHT0711

Thanks — a repro on kubuntu 22.04 is actually very helpful: it tells us this is not a Windows-specific input or GPU path, and on a Zen 5 + RTX 5060 machine it's clearly a software hotspot rather than slow hardware. Since it reproduces with -Q in *scratch*, the drag-selection / redisplay path itself is the prime suspect, and a native CPU profile would pinpoint it.

Could you capture a perf profile on the kubuntu machine and attach it here?

# 1. Build neomacs with the symbols-preserving profiling profile
#    (needs Rust: https://rustup.rs if you don't have it yet;
#     ~10 GB free disk; first build takes a while)
git clone https://github.com/eval-exec/neomacs
cd neomacs
cargo xtask fresh-build --profile profiling
# if the build stops on a missing system library, install the matching -dev
# package it names — see docs/building.md for the dependency lists

# 2. Record while reproducing
sudo apt install "linux-tools-$(uname -r)"
sudo sysctl kernel.perf_event_paranoid=1   # one-time; lets perf run unprivileged
perf record --call-graph dwarf ./target/profiling/neomacs -Q
# → in the neomacs window: drag-select in *scratch* for ~15 seconds,
#   then C-x C-c to quit (this is when perf.data gets written)

# 3. Generate a readable report
perf report --stdio > perf-report.txt

Please attach both perf-report.txt and perf.data (compress it first if large: xz perf.data) to this issue — you can drag files straight into the comment box. Note this builds current main, which already contains fixes after 0.0.18; if it still lags for you, the profile shows the live bug directly.

Three quick questions meanwhile:

  1. On kubuntu, is your session X11 or Wayland? (echo $XDG_SESSION_TYPE)
  2. Does the lag get worse as the selected region grows / in larger buffers, or is it constant from the moment the drag starts?

eval-exec avatar Oct 08 '26 13:10 eval-exec

Hi, @ISouthRain 你在 Windows 下体验 neomacs v0.0.19 时,拖动光标,觉得卡顿吗?

eval-exec avatar Oct 08 '26 13:10 eval-exec

11. 拖动光标,觉得卡顿吗?

是的, 相比 GNU Emacs 来说确实是卡顿的. 有一种果冻光标跟不上鼠标感觉. 我对比了 neovide 的果冻光标, 发现确实是 neomacs 光标有卡段的感觉 如视频所示:

https://github.com/user-attachments/assets/d7b742ca-af17-4b02-8079-c94058e797b7

ISouthRain avatar Oct 09 '26 01:10 ISouthRain