public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin terminal weirdness
@ 2015-09-13 18:50 Andrey Repin
  2015-09-14 19:46 ` cyg Simple
  2015-09-14 20:09 ` Warren Young
  0 siblings, 2 replies; 7+ messages in thread
From: Andrey Repin @ 2015-09-13 18:50 UTC (permalink / raw)
  To: All

Greetings, All!

This is best explained with a video ( apparently, list don't like videos ),
but for a quick reference, here's a description of observed behavior:

Call "man" on a sufficiently long topic. man bash would be quite sufficient.
Or just `less` a long enough text.
Hold down "End" key.
The screen buffer will jump and tear repeatedly, until you release the key.
Doesn't matter, if you exercise it in mintty or native console, it is all the
same.


-- 
With best regards,
Andrey Repin
Friday, September 11, 2015 07:06:33

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cygwin terminal weirdness
  2015-09-13 18:50 Cygwin terminal weirdness Andrey Repin
@ 2015-09-14 19:46 ` cyg Simple
  2015-09-15  4:05   ` Andrey Repin
  2015-09-14 20:09 ` Warren Young
  1 sibling, 1 reply; 7+ messages in thread
From: cyg Simple @ 2015-09-14 19:46 UTC (permalink / raw)
  To: cygwin

On 9/13/2015 2:36 PM, Andrey Repin wrote:
> Greetings, All!
> 
> This is best explained with a video ( apparently, list don't like videos ),
> but for a quick reference, here's a description of observed behavior:
> 

It might accept a link to an external service, maybe.

> Call "man" on a sufficiently long topic. man bash would be quite sufficient.
> Or just `less` a long enough text.
> Hold down "End" key.
> The screen buffer will jump and tear repeatedly, until you release the key.
> Doesn't matter, if you exercise it in mintty or native console, it is all the
> same.

Patient: Doctor, doctor my eye hurts sometimes.
 Doctor: When does it hurt?
Patient: When I put my finger in my eye it hurts!
 Doctor: My advice to you is to stop putting your finger in your eye.

-- 
cyg Simple

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cygwin terminal weirdness
  2015-09-13 18:50 Cygwin terminal weirdness Andrey Repin
  2015-09-14 19:46 ` cyg Simple
@ 2015-09-14 20:09 ` Warren Young
  2015-09-15  4:05   ` Andrey Repin
  1 sibling, 1 reply; 7+ messages in thread
From: Warren Young @ 2015-09-14 20:09 UTC (permalink / raw)
  To: cygwin

On Sep 13, 2015, at 12:36 PM, Andrey Repin <anrdaemon@yandex.ru> wrote:
> 
> Call "man" on a sufficiently long topic. man bash would be quite sufficient.
> Or just `less` a long enough text.
> Hold down "End" key.
> The screen buffer will jump and tear repeatedly, until you release the key.

That sounds like a video card performance issue, not a Cygwin, mintty, or less issue.

I just tried it here on a VM hosted on a box with an NVIDIA GeForce GTX 680MX GPU, and all I saw was normal redrawing, with scarcely any tearing.  That chip is about 3 years old, which probably still outperforms any current CPU-integrated GPU.

There are some small mitigations that might help.

One would be to convince the maintainers of less to be smarter about repainting the whole screen when it isn’t necessary.  But given that they haven’t fixed the horizontal scrolling bug in the ~20 years I’ve been using it, I wouldn’t hold out hope on that front.

Another would be to make mintty double-buffer its screen, if it doesn’t already.  That won’t help with the clear-screen call less is currently making, but it might reduce the tearing effect.

The same thing is happening with something like “ls -lR /“.  The only difference is that you can easily see what’s going on in the “man bash” case, since the content remains static.

Another way to see it is “vim /etc/sshd_config”, then hold down Ctrl-L.
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cygwin terminal weirdness
  2015-09-14 20:09 ` Warren Young
@ 2015-09-15  4:05   ` Andrey Repin
  2015-09-15  8:32     ` Thomas Wolff
  0 siblings, 1 reply; 7+ messages in thread
From: Andrey Repin @ 2015-09-15  4:05 UTC (permalink / raw)
  To: Warren Young, cygwin

Greetings, Warren Young!

>> Call "man" on a sufficiently long topic. man bash would be quite sufficient.
>> Or just `less` a long enough text.
>> Hold down "End" key.
>> The screen buffer will jump and tear repeatedly, until you release the key.

> That sounds like a video card performance issue, not a Cygwin, mintty, or less issue.

I can't believe it is a gfx performance issue, as I can't reproduce it with
PuTTY in the same situation.
I.e.
native console/local less = jumping and tearing.
mintty/local less = jumping and tearing.
native console/ssh+less = jumping and tearing.
mintty/ssh+less = jumping and tearing.
putty+less = no jumping, no tearing.

Let's try a different approach. The video id is ne3VmLZmD9g on a well-known
tube hosting service.

> I just tried it here on a VM hosted on a box with an NVIDIA GeForce GTX
> 680MX GPU, and all I saw was normal redrawing, with scarcely any tearing. 
> That chip is about 3 years old, which probably still outperforms any current CPU-integrated GPU.

> There are some small mitigations that might help.

> One would be to convince the maintainers of less to be smarter about
> repainting the whole screen when it isn’t necessary.  But given that they
> haven’t fixed the horizontal scrolling bug in the ~20 years I’ve been using
> it, I wouldn’t hold out hope on that front.

Well, let's say, this is unconvincing.

> Another would be to make mintty double-buffer its screen, if it doesn’t
> already.  That won’t help with the clear-screen call less is currently
> making, but it might reduce the tearing effect.

> The same thing is happening with something like “ls -lR /“.  The only
> difference is that you can easily see what’s going on in the “man bash”
> case, since the content remains static.

> Another way to see it is “vim /etc/sshd_config”, then hold down Ctrl-L.

I'm not familiar with vi/m, so I'll just trust you on the matter.


-- 
With best regards,
Andrey Repin
Tuesday, September 15, 2015 06:47:19

Sorry for my terrible english...

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cygwin terminal weirdness
  2015-09-14 19:46 ` cyg Simple
@ 2015-09-15  4:05   ` Andrey Repin
  0 siblings, 0 replies; 7+ messages in thread
From: Andrey Repin @ 2015-09-15  4:05 UTC (permalink / raw)
  To: cyg Simple, cygwin

Greetings, cyg Simple!

>> This is best explained with a video ( apparently, list don't like videos ),
>> but for a quick reference, here's a description of observed behavior:
>> 

> It might accept a link to an external service, maybe.

It doesn't.


-- 
With best regards,
Andrey Repin
Tuesday, September 15, 2015 06:54:46

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cygwin terminal weirdness
  2015-09-15  4:05   ` Andrey Repin
@ 2015-09-15  8:32     ` Thomas Wolff
  2015-09-15  9:50       ` Andrey Repin
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Wolff @ 2015-09-15  8:32 UTC (permalink / raw)
  To: cygwin

On 15.09.2015 05:54, Andrey Repin wrote:
> Greetings, Warren Young!
>
>>> Call "man" on a sufficiently long topic. man bash would be quite sufficient.
>>> Or just `less` a long enough text.
>>> Hold down "End" key.
>>> The screen buffer will jump and tear repeatedly, until you release the key.
> ... as I can't reproduce it with PuTTY in the same situation.
With putty, try the Home key instead. If you hold that, the result will 
look even worse. Or try to hold the Down key at the end (of man bash) – 
not good either.
Slightly different effects in different environments are simply the 
result of timing. You cannot completely avoid such effects if the window 
contents is rewritten repeatedly.
------
Thomas

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cygwin terminal weirdness
  2015-09-15  8:32     ` Thomas Wolff
@ 2015-09-15  9:50       ` Andrey Repin
  0 siblings, 0 replies; 7+ messages in thread
From: Andrey Repin @ 2015-09-15  9:50 UTC (permalink / raw)
  To: Thomas Wolff, cygwin

Greetings, Thomas Wolff!

>>>> Call "man" on a sufficiently long topic. man bash would be quite sufficient.
>>>> Or just `less` a long enough text.
>>>> Hold down "End" key.
>>>> The screen buffer will jump and tear repeatedly, until you release the key.
>> ... as I can't reproduce it with PuTTY in the same situation.
> With putty, try the Home key instead. If you hold that, the result will 
> look even worse. Or try to hold the Down key at the end (of man bash) – 
> not good either.

Okay, it seems to really depends on the length of the scrollback buffer under
the hood.
Wasn't able to reproduce it with Home as you suggested, but observed it with
(again) End, when I tried to `less /var/log/syslog`. Which is, quite
unsurprisingly, quite long.
Though, the effect is minimal, it is still present.
Which confirms that it is, seemingly, less's, and not Cygwin's, fault.

> Slightly different effects in different environments are simply the 
> result of timing. You cannot completely avoid such effects if the window 
> contents is rewritten repeatedly.

The timing differences can be attributed to environment. I've been comparing
some string function implementations recently, and Windows seems to be real,
real slow. Like, 10 times slower than Linux, which I can't really explain with
hardware difference. (Win/i5 vs. Linux/G1620)


-- 
With best regards,
Andrey Repin
Tuesday, September 15, 2015 12:42:23

Sorry for my terrible english...

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-09-15  9:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-13 18:50 Cygwin terminal weirdness Andrey Repin
2015-09-14 19:46 ` cyg Simple
2015-09-15  4:05   ` Andrey Repin
2015-09-14 20:09 ` Warren Young
2015-09-15  4:05   ` Andrey Repin
2015-09-15  8:32     ` Thomas Wolff
2015-09-15  9:50       ` Andrey Repin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).