https://bugs.kde.org/show_bug.cgi?id=504600

            Bug ID: 504600
           Summary: Hang when changing colour of "all" cells
    Classification: Applications
           Product: calligrasheets
      Version First unspecified
       Reported In:
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: usability
          Assignee: calligra-sheets-bugs-n...@kde.org
          Reporter: ulte...@gmail.com
  Target Milestone: ---

SUMMARY
When selecting all cells and changing the font color (and possibly for other
operations), the UI hangs.

STEPS TO REPRODUCE
1. Open a document in Calligra sheets (any will do, even an empty one)
2. Use the "select all" button on the top left of all the cell headers in the
workspace
3. Right click on the top left cell (so that the context menu opens while all
cells are still selected)
4. Click on the "Cell Format" menu option
5. In the "Cell Format" dialog, Click on the colour swatch next to the
"Colour:" label
6. In the "Select Color" dialog, select any colour other than the current
colour and press "OK"
7. Back in the "Cell Format" dialog, click "Set Cell Format"

OBSERVED RESULT
- At step [2.], the number of cells that is shown selected is 32767 * 1048576
After step [7.]:
- UI will hang
- You will notice single core CPU usage

EXPECTED RESULT
- At step [2.], show "All Rows x All Columns" instead of the numerical value of
maximum rows and columns
- UI does not hang while the work is being done. Instead:
  - editing the cells gets disabled
  - all UI buttons with actions which would interfere with the ongoing
operation, get visibly disabled
  - a working marker shows up (maybe even the mouse pointer can change to
working, when it enters the workspace)
  - scrolling around to view the workspace is still possible
- Amount of time taken to complete the task is acceptably proportional to the
number of cells the user is actually working on

SOFTWARE/OS VERSIONS
Calligra Sheets: 25.04.1
KDE Frameworks: 6.14.0
Qt: Using 6.9.0 and built against 6.9.0
EndeavourOS (Wayland)
Build ABI: x86_64-little_endian-lp64
Kernel: linux 6.14.6-arch1-1

ADDITIONAL INFORMATION

Suggestions:

I am assuming, the application starts changing colour values for all cells.
1. Instead, have a selection space proportional to the user's actual workspace
(say used rows x10 and used columns x10)
2. Change only the colour values (this one is specific to the colour operation
and will need to be different for other operations on "all cells") of in-use
cells, or cells that already have some formatting information
  - for the rest, make no change. Instead, have a "default" value for the whole
workspace, which can be changed at will

Also, offload the work to another thread, so that scrolling around is still
possible

Bonus:
A. Instead of processing row-by-row or column-by-column, process the cells
closest to 0,0 first, then going further
B. While the worker is running (and User input is disabled), periodically call
to update data from the worker's output. The call needs to be made from the UI
thread at intervals, appropriate for the UI refresh rate.

Workaround

For the user, instead of using the "select all" button:
1. Press Ctrl+End to get to the last cell
2. Press Shift+Ctrl+Home to select upto the first cell
3. Run your operation

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to