SOLVESPACE -- parametric 2d/3d CAD
Examples
Tutorials
Features
Download
Reference
Technology
Library
Forum
Contact
USER FORUM

(you are viewing a thread; or go back to list of threads)

performance optimization (by Alex B)
Folks,

Performance is pretty terrible when doing translate-extrude-rotate with large number of repetitions to the point Solvespace locks up. Are there any ways to improve on it ?

I'm attaching a simple example. Try changing the number of revolutions to say 40 to see the effect :)
Thu Aug 13 2020, 16:44:38, download attachment perf.slvs
(no subject) (by Andrew)
What you can try is breaking you problem into multiple drawings and use link/assemble to produce the final result. While this speeds things up somewhat, the program can still slow down. This does mean however that you can work on the cylinder object without the slow down of the holes and only suffer it when updating the hole array and the final assembly. The attached zip demonstrates this, with final.slvs being the final drawing. Note also the use of a construction drawing to control diameter and height of the holed cylinder.

Hope this helps
Fri Aug 14 2020, 11:17:26, download attachment holed_cylinder.zip
(no subject) (by Alex B)
Good suggestion, thank you. Another thing I was observing is extreme memory usage on order of 8-9GB. Seems a bit extreme for something like this.
Fri Aug 14 2020, 13:18:16
(no subject) (by Paul)
Another thing is to consider making the holes shorter. I used an outer sketch distance of 27.5 and a depth of 3.0 to cut the holes. It didn't help in this case and still takes about 1 minute to complete the change to 40 rotations.

I didn't see any significant memory usage. What version of SolveSpace are you running?
Fri Aug 14 2020, 15:12:46
(no subject) (by Andrew)
As far as I now, using link/assemble, brings in a solve model, hence creating a column of 'holes', and then linking it into another drawing, and creating the circular array of 30 columns. Linking that in to create the actual holes, save a huge amount of solver work where there are a lot of entities in a model.
Fri Aug 14 2020, 17:51:19
(no subject) (by Alex B)
I've built the latest code from the master branch for this.
Mon Aug 17 2020, 16:57:21
(no subject) (by Paul)
There have been some modest improvements since this was posted. I've been using that holed_cylinder as a performance test, changing the repeats on the rotate group from 4 to 40. It used to take about 3 minutes to complete with a normal build and 58 seconds with an OpenMP build. Now it's about 44 seconds normal and 25 with OpenMP (I have 4 cores/8 threads).

The real problem here is algorithmic complexity - Many things in SolveSpace have timing that scales as the square of the number of items (surfaces, edge segments, triangles, etc) so it will slow down as complexity increases. Some of these have been improved, but not all.

Running things on multiple cores gives a modest speed increase of 2-4x but that doesn't scale with the geometry. If you're building from source try adding -DENABLE_OPENMP=yes to your cmake command.

There are good solutions to the scaling problems but nobody has time to implement them right now.
Mon Sep 14 2020, 14:00:52
(no subject) (by Alex B)
Thanks Paul, I will try adding that flag.
Mon Sep 21 2020, 12:45:50
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):
© 2008-2018 SolveSpace contributors. Most recent update Nov 22 2018.