micro icon indicating copy to clipboard operation
micro copied to clipboard

^K cut line is really slow

Open pkitszel opened this issue 5 years ago • 10 comments

^K cut line is really slow

Cutting line by CTRL+K is really slow, file was standard code file, I reproduced it in two different files. File had less than 450 lines before cutting. Other things (save, find) are working fine.

Specifications

Commit hash: c51f849 OS: Ubuntu 18.04 Terminal: urxvt (via X-Ming on Windows)

pkitszel avatar Mar 09 '20 10:03 pkitszel

How much time does it take to cut a line? (In other words, can you define what "really slow" is in this context?)

Calinou avatar Mar 09 '20 10:03 Calinou

Thank you for your interest! It takes about 6 seconds (measured by stopwatch). So, orders of magnitude too slow.

pkitszel avatar Mar 09 '20 10:03 pkitszel

It's instant for me, with pretty much any buffer size. I am curious what'd results you'd get when using this benchmarking system: https://github.com/zyedidia/micro/pull/1549

LevitatingBusinessMan avatar Mar 09 '20 22:03 LevitatingBusinessMan

Do you have xclip installed? Are you using a remote X session?

sparques avatar Mar 11 '20 00:03 sparques

@deusnefum - I don't have xclip installed, and it was over remote X session.

I could not reproduce issue on the same machine setup but local/standard X session.

pkitszel avatar Mar 11 '20 09:03 pkitszel

@deusnefum , I reproduced the issue

now from linux host, ssh -X to another linux machine, xclip and xsel installed (removal of either of those has not changed the behavior)

I'm using 2.0.10 + two additional PRs merged: dmaluka/luamouse and dmaluka/hlsearch-v3

pkitszel avatar May 05 '22 23:05 pkitszel

@pkitszel,

If you set 'set clipboard internal' does it prevent the lag?

matthew-hiles avatar May 06 '22 14:05 matthew-hiles

@pkitszel,

If you set 'set clipboard internal' does it prevent the lag?

yes, then it's fast

pkitszel avatar May 06 '22 15:05 pkitszel

Okay, so it definitely has to do with the lag communicating the X11 clipboard over the relatively slow SSH tunnel. Potentially fixable by making updates to the X11 clipboard asynchronous to the updates to the internal clipboard.

I'll see if I can't get a PR going--won't be happening today though.

matthew-hiles avatar May 06 '22 15:05 matthew-hiles

It is not specific to SSH. It is slow also on a native terminal in Sway.

image

hholst80 avatar Dec 26 '23 13:12 hholst80