Bug 151167 (cancel-long-operations) - [META] Make long operations cancellable
Summary: [META] Make long operations cancellable
Status: NEW
Alias: cancel-long-operations
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevAdvice
Depends on: 49701 89340 137147 148407 150239
Blocks: Performance
  Show dependency treegraph
 
Reported: 2022-09-24 23:18 UTC by Ed Stauff
Modified: 2024-04-25 02:41 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Stauff 2022-09-24 23:18:37 UTC
Description:
In any LO application, the user should be able to cancel any operation that could reasonably take a very long time – 5 minutes or longer on a slow machine.
Around once or twice a week I manage to accidentally press some key combination that changes the cursor to the "wait" state and locks up the application.  I have also experienced the related bugs #48701 (abort loading of a file) and #148407 (cancel an ongoing paste).
I was tempted to file this as a bug rather than a feature request: if an app hangs, it's a bug.  And if the user has no idea how long the operation will take, then after a certain time threshold (several minutes), it's effectively hung from the user's persepective.  Requiring some sort of progress bar for long operations would also be a great help.
Killing the process is a poor substitute, for a variety of reasons, including lost work in whatever documents are open (I usually have many open).

Steps to Reproduce:
1. Start an operation that's going to take several or many minutes to complete.
2. Try to cancel it – there isn't any way.

Actual Results:
I have to kill the LO process.

Expected Results:
Pressing the ESC key cancels the operation, or perhaps invokes a dialog confirming that I want to cancel.  Or clicking a button the the status bar.


Reproducible: Always


User Profile Reset: No



Additional Info:
I didn't have any Other Information, but if you insist ...
There's a number of ways this could be implemented, including:
a) Each long operation polls some logical status flag that indicates if the user requested cancelling.  Probably not the most reliable approach, though perhaps the cleanest.
b) Each long operation runs in its own thread, leaving the LO UI alive, though possibly temporarily disabling editing operations in the active document.  Hitting the cancel button (or ESC or whatever) kills the thread.  Probably not the cleanest approach, though perhaps more reliable.
Comment 1 Stéphane Guillou (stragu) 2023-05-31 09:17:57 UTC
(By "48701" I assume you mean bug 49701)

As you've already noticed, we have a few reports related to cancelling costly/long operations, on specific areas:

- bug 49701: cancel loading a file
- bug 89340: cancel exporting to PDF
- bug 137147: cancel formula calculation (Calc)
- bug 148407: cancel a paste action (Writer)
- bug 150239: cancel long operations, namely pasting on erroneous target (Calc)

... and probably others.

I understand you proposal would be to cover all these cases with one single solution for the whole suite.

UX team, what do you think of the case-per-case solutions versus a one-size-fits-all solution?

Adding "needsDevAdvice" keyword too have an opinion on how feasible it is.
Comment 2 Heiko Tietze 2023-05-31 09:45:56 UTC
Being able to interrupt lengthy operations is in fact a usability requirement. Ideally based on a prediction of the progress (if you don't know how long an operation takes you cannot decide whether or not to interrupt) and run in the background (lengthy operations should not block the workflow).

I would keep this ticket as META.
Comment 3 Stéphane Guillou (stragu) 2024-04-25 02:41:22 UTC
(In reply to Heiko Tietze from comment #2)
> I would keep this ticket as META.
Done.