Smooth scrolling

panagiotis merakos merakosp at gmail.com
Tue Feb 2 09:54:19 EST 2021


Hello folks,

This bug report contains a workaround for smooth scrolling - hope it helps.

https://quality.livecode.com/show_bug.cgi?id=19759

Cheers,
Panos
--

On Tue, 2 Feb 2021 at 16:17, Craig newman via use-livecode <
use-livecode at lists.runrev.com> wrote:

> On a Mac, I made a field with 25000 words or so. Certainly dragging the
> thumb is jerky.
>
> But dragging the thumb forces the field's scroll  to track the thumbPos, as
> it relates to the number of lines and the total "pixel" travel available to
> that thumb. I don't see how a field could scroll smoothly at all, since the
> thumb and the scroll are locked together.
>
> In other words, how can it "glide" from one line (scroll position) to
> another, since the thumbPos has a finite number of possible locations, and
> if there are a LOT of lines, each location may be several lines away?
>
> Craig
>
> -----Original Message-----
> From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On
> Behalf
> Of Richard Gaskin via use-livecode
> Sent: Monday, February 01, 2021 10:11 PM
> To: use-livecode at lists.runrev.com
> Cc: Richard Gaskin <ambassador at fourthworld.com>
> Subject: Re: Smooth scrolling
>
> 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
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list