[Libreoffice-bugs] [Bug 140405] New: UI: Speedup scrolling by looking ahead in keyboard buffer to skip redundant screen rendering

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Feb 14 11:40:47 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=140405

            Bug ID: 140405
           Summary: UI: Speedup scrolling by looking ahead in keyboard
                    buffer to skip redundant screen rendering
           Product: LibreOffice
           Version: Inherited From OOo
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: medium
         Component: Calc
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: ralacroix at hydro.mb.ca

Description:
The spreadsheet buffers keystrokes and processes them in sequence with each
drawing operation. If the user causes the screen to scroll multiple times in
rapid succession, the entire page is redrawn with each keystroke. This can take
a long time when the CPU or GPU are busy or underpowered. This proposal removes
redundant screen drawing by using a greedy algorithm to consume the sequence of
multiple keystrokes (if any) in the keyboard buffer to reposition the active
cell before causing the screen to redraw (stopping the lookahead at any
keystroke which doesn't scroll the screen, if any). In this scenario, we do NOT
add delays between reading the keyboard and drawing the screen (to give the
user an opportunity to hit more keystrokes) as this would make the program
stutter for people with fast screen updates. If the screen can be redrawn
faster than the user can press keys, then the software behaves the same. But if
redrawing takes longer, then the user may have placed multiple keystrokes in
the buffer before LO Calc checks the keyboard again - this is when the
enhancement would help the user.

This enhancement has no change to the screen rendering part of the software,
hence it is simpler and more realistic than the proposal in
https://bugs.documentfoundation.org/show_bug.cgi?id=140176 which requested that
drawing be aborted. Only the the event loop and dispatch are affected in this
enhancement request.

The event loop would consume a keystroke, determine if the screen would scroll,
and if so update the active cell position and continuing reading the keyboard,
until either there are no keystrokes left in the buffer, or the keystroke would
not cause the screen to scroll (so put it back in the buffer). Then proceed
with updating the screen.

Steps to Reproduce:
1. Load a large spreadsheet.
2. Fill up all your cores and (especially) your GPU with heavy processing. A
distributed computing project is a good candidate.
3. Go to the top of the spreadsheet.
4. Hit the page-down key several times quickly.

Actual Results:
Watch how long LO Calc takes to reach the desired cell, and how frustrating it
is to recover from hitting page-down too many times after passing that cell.


Expected Results:
It could be faster.



Reproducible: Always


User Profile Reset: No



Additional Info:
Additional Info:
Version: 7.0.4.2
Build ID: dcf040e67528d9187c66b2379df5ea4407429775
CPU threads: 12; OS: Linux 4.19; UI render: default; VCL: gtk3
Locale: en-CA (en_CA.utf8); UI: en-US
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210214/d714b02b/attachment.htm>


More information about the Libreoffice-bugs mailing list