> Eli Zaretskii writes: > >>> From: joakim@verona.se >>> Date: Sat, 14 Oct 2023 20:09:31 +0200 >>> >>> Hello, >>> >>> I have a long standing problem where it appears that my build of emacs >>> seems to invalidate a lot of regions on screen, which leads to flicker >>> in my setup of vnc. >>> >>> This flicker problem doesnt appear so much in the emacs that is >>> installed by my distro, which is fedora, emacs 28. >>> >>> It would be easier to debug this if emacs could be persuaded to give >>> some visual hints of which regions its invalidating. Is this possible? >> >> Not AFAIU, since Emacs doesn't invalidate any regions. It decides by >> itself which parts of the screen need to be redrawn, and then does >> that. > > If so, it appears to me that my build of emacs redraws a lot of regions > unecessarily. So the my question is if its possible to make Emacs show > some hints of which areas its redrawing. Then I would know if the > problem is in emacs, or elsewhere. > > The emacs 28 in my distro doesnt flicker, nor does apps such as gedit. > >> >>> I use these settings in turbovnc: >>> Tight+Low quality jpeg(WAN) >>> /opt/TurboVNC/bin/tvncconfig -set ALR=1 >>> /opt/TurboVNC/bin/tvncconfig -set ALRAll=true >>> >>> The idea is that a low quality codec should be used to refresh >>> invalidated rects, and then after a while be losslessly refreshed. >>> This works well in applications that dont invalidate the entire window, >>> when only small parts of the window needs to be changed. >> >> I don't know anything about turbovnc, but what you say is not how >> Emacs display works. >> >> Btw, does the flickering happen with text-mode frames or GUI frames? >> And which part(s) of the Emacs display flicker? I managed to make a screenshot that shows the problem. In the image I made an emacs window with some black text on red background. If I move the cursor just one line, you can see that 2 large regions become blurred. Since I just moved the cursor one line down, its rather confusing why these 2 seemingly unrelated regions should be redrawn. > > - If I access the same emacs instance in a tty, it does not flicker. > > - only gui frames flicker > > - the text flickers in a region around the cursor when moving it, it > seems not consistent. > > To be a little bit more elaborate: > > - I open a file or an emacs application which has a lot of colors when > font locked. The colors matter, because when using low quality jpeg > encoding for vnc, red colors in text is more obviously "bleeding". > > - if i wait a little bit, a lossless refresh occurs, and all text is now > crisp regardless of color. so far so good. > > - if I know move the cursor to a new line the line will need to be sent > by vnc to the client, because there was a cursor drawn there. Therefore > the line will flicker, and this is expected. > > - However, I dont expect other regions in the emacs frame to be needed > to be sent again, because nothing happened there. But in my case > random parts of the emacs window seems to be redrawn, and thus > flicker. And again, this doesnt seem to happen with the distro emacs. -- Joakim Verona joakim@verona.se