CamBam
News:
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 12, 2019, 04:04:32 am


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: [V1 - 30] "Cancel" does not work as expected  (Read 634 times)
Mark81
Wookie
****
Offline Offline

Posts: 305


View Profile
« on: July 18, 2019, 14:25:52 pm »

I ran a "break on intersection" operation on a huge file. After some time I decided to abort the current job and I pressed the Cancel button. In the log window the message "Abort current operation" appeared but the task continued. I pressed again the button, nothing happened. After several minutes, I had to kill the CamBam process because I had no other way to break what it was doing.

I would expect that when you request to "abort" a long operation, it would take only a while to do so.
« Last Edit: July 18, 2019, 20:15:28 pm by dh42 » Logged
EddyCurrent
CNC Jedi
*****
Offline Offline

Posts: 4078



View Profile
« Reply #1 on: July 18, 2019, 17:37:18 pm »

It may be that CamBam has to backtrack to undo what it did, on a large file this may also take a while, I'm just guessing though.
Logged

Made in England
lloydsp
CNC Jedi
*****
Offline Offline

Posts: 8080



View Profile
« Reply #2 on: July 18, 2019, 18:20:14 pm »

If I had to guess, I would presume that CB creates (in computer terms) a 'stack' of changes.  In order to cancel, it has to un-do all of those.  That could take every bit as long as it took to get to that cancel point!

Lloyd
Logged

"Pyro for Fun and Profit for More Than Fifty Years"
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 5676



View Profile WWW
« Reply #3 on: July 18, 2019, 20:07:16 pm »

Hello

I just tried on CB v1.0 with a file that have 620 rectangles that cross each other ... so a total amount of 2480 lines ...

When I hit the Cancel button 4 min later, the calculation stop immediately

In the log windows, I get the following messages:

Aborting current operations...

then immediately after,

Operations aborted.

I ran the calculation again, but I wait 12 min before hitting the Cancel button ; on the screen, Cambam has started to draw the new polylines since ~1min (the source polylines have been unselected and the new polylines start to appears in red)

In this case, hitting the Cancel button don't stop the job immediately ; as you, I get the Aborting current operations... message ... then I wait, I wait ..... 46 min for the cancellation to be finished ....

The memory usage for "Cambam.exe *32" in the task manager end up at ~990 000K (71 000K with the "just loaded file") ; the % CPU usage for the thread used by CB is 12/13% of the whole CPU power, so 100% of the power usable for a thread on a 8 threads 4 core CPU (i7 - 4.5Ghz ; Win7 ultimate 64 bits)

So I can't said that it's a bug, because all is working, CB do not crash, but it's very long if the Cancel button is used after than CB started to redraw the lines ... but maybe some improvement can be made .. I'll point this out to Andy.

I attach a test file, lighter than the one used above (200 rectangles)

On my PC, with this file, after a "break at intersection" (tol = 0.01) it take ~ 19s for Cambam to start to redraw the lines and a total amount of ~3min to finish the whole job (end up with 65046 polylines)

Canceling the job before the 19s act immediately, canceling the job at 30s, after than CB has started to redraw the lines takes more than 1min, only for the cancellation.

++
David

* 200poly.cb (79.4 KB - downloaded 33 times.)
« Last Edit: July 18, 2019, 20:09:41 pm by dh42 » Logged
lloydsp
CNC Jedi
*****
Offline Offline

Posts: 8080



View Profile
« Reply #4 on: July 18, 2019, 20:50:54 pm »

Good job, David!  Both the users and Andy should thank you for that effort.

Eh... I guess I'm just patient.  I've always counted on CB doing what it should, and when a 'cancel' operation took a while, I just walked away.

But I agree that it should not take (much) longer to UN-do what was done than to do it!

Lloyd
Logged

"Pyro for Fun and Profit for More Than Fifty Years"
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 5676



View Profile WWW
« Reply #5 on: July 18, 2019, 21:36:44 pm »

Hello

Quote
Eh... I guess I'm just patient.  I've always counted on CB doing what it should, and when a 'cancel' operation took a while, I just walked away.

I rarely works with very heavy files with CB, especially with 2D ; the last time I killed a CB task is with an imported DXF ; CB becomes very slow because the snappy plugin was enabled with all features checked and the DXF was a bunch of small lines ; there is one features in snappy (I don't remember which one) that can slow CB dramatically (but no crash) ... and it can looks "frozen"

++
David
Logged
Mark81
Wookie
****
Offline Offline

Posts: 305


View Profile
« Reply #6 on: July 18, 2019, 22:12:41 pm »

Thanks for the explanation.
I think the abort command should just... abort! Then, if I want to revert back the partial changes I can use the undo function. Of course it's ok if it takes some time now, to complete the undo.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.107 seconds with 19 queries.

Copyright © 2018 HexRay Ltd. | Sitemap