Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Manipulation of large number of targets is slow

#1
Hi, my application requires a large number of target to be processed, usually between 100 and 100 000 by parts (Imported via the API). Even for the lower bound, I have a hard time manipulating the target without RoboDK freezing for minutes. Deletion of more than 500 target seems endless, yet the RoboDK process doesn't utilize more than 3.5% of my processor.

Even on a fresh install of v5.9.4.25460, with a cell containing only a robot and around 2500, I get freezing for minutes when deleting them 500 at a time.

Is there any settings I can change or something I can do to get better performances?

Thanks
#2
You can speed up processing your API commands by turning Render off while you perform a lot of operations.

You can find more information here:
https://robodk.com/doc/en/PythonAPI/robo...ink.Render

You can also find some functions that allow you to perform certain operations in bulk, such as setPoses or Delete items by passing a list of the items you want to delete:
https://robodk.com/doc/en/PythonAPI/robo...ink.Delete
#3
Thanks for your answer!

For the importing part, I'm already turning render off. It takes some time to import the points, but it's expected for that number of target. It's when performing operation in the GUI that it is extremely slow since I can't turn off render.

Does this means that to do operations in bulk, i must go through the API and can't do it directly in the graphic application? Isn't there a way to stop the auto-rendering between each action when manipulating multiple items from the tree? I don't know how actions are processed in the backend, but only triggering a render when the bulk action is completely done would speed up things at no apparent cost, since, anyway, the render is frozen while processing the actions.

I can write a script that turns off the render and then deletes the selection, but I feel this behavior should be expected from the standard function and not from an add-in script. Let me know what you think about it.

Also, I'm a bit confused as to why RoboDK doesn't use more resources when they are available. Could you please address that point too?

Thanks!
#4
When you use the UI many operations are already optimized for speed.

Can you share your RoboDK project and the steps you are following? We can better take a look and see how to improve the speed.

Most UI operations can't be multithreaded though. This is why you don't see all cores being used for most UI operations.
#5
You can find a small project with a large amount of target in the Attachments.

I'm just selecting a bunch of the targets (ex: from s1t1 to s25t20, which is 297 targets) and then I press the delete button on the keyboard. I get a deleting speed of around 2.5 targets/s this way. 

I played around with the python API doing small tests. I get roughly the same speed using the Robolink.Delete you mentioned if I don't specify Render(False) before the call. If I do stop the rendering, the performance is improving drastically, with a deleting speed of close to 100 targets/s.



.rdk   test.rdk (Size: 5.75 MB / Downloads: 13)
#6
We just updated RoboDK to improve the performance when deleting targets or any other items in bulk. You can take the latest version here (Windows only for now):
https://robodk.com/download

You should obtain a deletion rate of about 700 targets per second. If you are creating your project from scratch using the API you can consider deleting your current project and rebuilding it. It may be faster than deleting/adding the items. This is because RoboDK tries to keep trace of the deletion actions in the undo stack.
#7
I just tried the latest release, and it is indeed faster now, even more than I expected! Thank you for implementing those changes, it is genuinely a life changer for my use case!
#8
Thank you for your feedback, I'm happy to hear the update helped you improve the performance!
  




Users browsing this thread:
1 Guest(s)