Cursor Lag When Scrolling Text

23 views
Skip to first unread message

Chris George

unread,
Jul 6, 2015, 10:39:46 AM7/6/15
to leo-e...@googlegroups.com
Hello,

Leo 5.1-final, build 20150705110342, Sun Jul  5 11:03:42 CDT 2015
Git repo info: branch = master, commit = b0cc360843e3
Python 2.7.6, PyQt version 4.8.6
linux2

All plugins disabled, no styling or theming activated. Plain Jane, vanilla, Leo on Linux with well known, well tested python/pyqt versions, on Linux Mint 17.

Create a node. Create five or six hundred words of text. Place cursor at the end of the text. Push down on and hold the left arrow key on the keyboard and scroll back past a hundred words or so and release the arrow key.

For me, the cursor continues to move for a couple of dozen characters or so. The longer I hold the arrow key, the more characters it continues to scroll through after release. This behaviour also occurs when using the backspace key (really annoying).

Is anyone else experiencing this?

Chris

Terry Brown

unread,
Jul 6, 2015, 11:32:11 AM7/6/15
to leo-e...@googlegroups.com
Yes, I've been starting to look in to it. Thanks for the
verification. I've been looking at sticking timestamps to events to
see how old they are when they're processed, so it would be possible to
just not process key events more than maybe 0.1 seconds old.

But I think it might be worth using the (more sensible than mine ;-)
test environment you describe with git bisect to find out when this
started happening.

Cheers -Terry


> Chris

Terry Brown

unread,
Jul 6, 2015, 11:44:28 AM7/6/15
to leo-e...@googlegroups.com
On Mon, 6 Jul 2015 10:32:04 -0500
"'Terry Brown' via leo-editor" <leo-e...@googlegroups.com> wrote:

> > All plugins disabled, no styling or theming activated. Plain Jane,
> > vanilla, Leo on Linux with well known, well tested python/pyqt
> > versions, on Linux Mint 17.
> >
> > Create a node. Create five or six hundred words of text. Place
> > cursor at the end of the text. Push down on and hold the left arrow
> > key on the keyboard and scroll back past a hundred words or so and
> > release the arrow key.
> >
> > For me, the cursor continues to move for a couple of dozen
> > characters or so.

Hmm, must admit when trying it 'vanilla' with
HOME=/tmp python launchLeo.py /home/tbrown/r/del.leo the issue really
doesn't exist to a degree worth complaining about. Will try bisect
with my regular settings.

Cheers -Terry

Terry Brown

unread,
Jul 6, 2015, 12:11:20 PM7/6/15
to leo-e...@googlegroups.com
On Mon, 6 Jul 2015 10:44:20 -0500
Problem starts at a1c8133. I'm guessing it's exactly the same issue as
904e70f:

fix speed issue in todo.py ui update

w.setStyle("/* */") was being called to update appearance for
attribute based stylin is too slow for that when scrolling through
the tree. Now it's called on idle.

i.e. w.setStyleSheet() is too slow to call anywhere where speed
matters. So after loading etc. is fine, but between keystrokes is not
doable.

I think I've fixed it in
https://github.com/leo-editor/leo-editor/commit/2ce861d

Cheers -Terry

Chris George

unread,
Jul 6, 2015, 4:33:00 PM7/6/15
to leo-e...@googlegroups.com
Totally works for me now. 

I had loaded todo.py for an evaluation, but hadn't been using it for some time.

Chris

Terry Brown

unread,
Jul 6, 2015, 4:44:04 PM7/6/15
to leo-e...@googlegroups.com
On Mon, 6 Jul 2015 13:33:00 -0700 (PDT)
Chris George <techn...@gmail.com> wrote:

> Totally works for me now.
>
> I had loaded todo.py for an evaluation, but hadn't been using it for
> some time.

Just for clarity, I don't think todo.py was involved, todo.py just
ran in to the same issue recently. I think the deciding factor as to
whether you were seeing this problem or not is a combination of machine
speed and the style-sheet you have in use.

Cheers -Terry

> Chris
>
> On Monday, July 6, 2015 at 9:11:20 AM UTC-7, Terry Brown wrote:
> >
> > On Mon, 6 Jul 2015 10:44:20 -0500
> > "'Terry Brown' via leo-editor" <leo-e...@googlegroups.com
> > <javascript:>> wrote:
> >
> > > On Mon, 6 Jul 2015 10:32:04 -0500
> > > "'Terry Brown' via leo-editor" <leo-e...@googlegroups.com
> > > <javascript:>>
Reply all
Reply to author
Forward
0 new messages