Smooth scrolling

Richard Gaskin ambassador at fourthworld.com
Mon Feb 1 22:10:40 EST 2021


David Epstein wrote:

 > My impression is that a LiveCode field scrolls less smoothly than
 > a comparable field in some other programs, such as MS Word and
 > Scrivener.  If I paste about 25,000 words into a word wrapped
 > scrolling field, and then drag the scrolling thumb up and down
 > there is much more jumpiness than I see when I do the same thing
 > to the same text in those other programs.  (LC 9.6 on Mac OS 10.12.6).
 >  Do others see the same thing?  Does anyone know the underlying cause
 > of this, or a remedy?

Nice to hear the name Scrivener. Blount did some good rethinking of how 
words are managed when he came up with that app.

In the olden days I remember being impressed with how smoothly LC 
scrolled vs things like Word, which wasn't all that surprising given 
that LC buffers the whole field in RAM while Word pages from disk.

A lot's changed since then. Not only have SSDs taken over to narrow the 
gap, but I no longer have a copy of Word to compare anything to. :)

But I did just do a quick test of LC v9.6.2rc2 vs LibreOffice Write on 
Ubuntu 18.04, using Kafka's Metamorphosis to get a reasonably close 
number of words to your test (Gutenberg Project RTF is 25,180 words: 
http://www.gutenberg.org/files/5200/5200-r.rtf ).

Very different setup of course, but FWIW LC and LibreOffice are quite 
close in scrolling, though LC seems noticeably smoother.

Of course Ubuntu and macOS couldn't be more different from top to 
bottom, with different font managers, buffering APIs, compositors, etc., 
so while it was easy for me to do this quick test it's almost entirely 
useless.

What might be nice would be someone with good knowledge of Apple 
low-level tools, similar to the ones we see for Android or to some 
degree strace, where graphical UI stuff can be profiled so we can see 
what Word and LC are doing differently.

It might also be worth setting the field's layerMode to "scrolling" and 
the stack's compositorType to "CoreGraphics" to see if that improves things.

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list