Please help me know if there is a way to reduce memory consumption. Nevermind, looks like re-importing the STEP model with this Assembly3 branch helped significantly.
Real world example
here. 205 unique parts (but multiple instances of many parts, approximately 260 or so rendered parts).
Non-Assembly3:
2.8 GB memory usage from 43.3MB on disk (default file compression setting of 3).
Assembly3 (each Assembly3 container put into separate file):
5.5GB memory usage from 70.9MB on disk.
4.2GB memory usage when top level sub-assemblies are frozen per
this advice.
And this is not even using the
solver.
To make this I changed the groups (which were set up by the STEP import of FreeCAD 0.17) to Assembly3 assembly containers and separated the assemblies into individual files. I only added constraints to the bottom.
There is a problem with the in-memory representation of these parts. Is there any way to reduce the memory consumption? With 8GB memory I'm unable to use a browser while editing the full model! Further, with the parts I intend to add I'd expect to run out of memory using FreeCAD-Assembly3.
I did see advice elsewhere of changing threaded screws to plain cylinders (among other geometric simplifications) to reduce memory consumption, but it's hard to get to that point, and I expect there are other ways to reduce memory usage (i.e. 5.5GB -> 2.8 GB somehow?). There are duplicate parts I can simplify (I expect will lower memory usage) using Assembly3, but again it's hard to do this without my reference material open within a browser.
I don't believe something analogous to openscenegraph would be helpful here in this example, the parts/assemblies themselves appear to be represented using too much
main memory. Openscenegraph analogy would be more useful for lowering/optimizing GPU memory/processing usage per the scene's demand (raise frame rate, more detail when zooming in, work around GPU bottlenecks and all that). I hardly believe that lowering detail (lowering GPU load), or unloading parts not visible to the camera from main memory will help this peak main memory usage problem.
I'm using Debian Linux, x64_86 and the
most recent Assembly3 release.
EDIT: I do see this
ReduceObjects parameter I can change, I'll try to re-import the STEP file.
EDIT2: Oh,
this looks relevant. I guess the solution would be to put all assemblies back into one document?
EDIT3: Ok, I re-imported the step file using the assembly3 release (ReduceObjects=true) instead of FreeCAD 0.17, and that appears to have shrunk down the main memory usage to 1.7GB and disk representation to 20MB. It did a much better job importing the STEP file, I see duplicate instances appear to be linked instead of copied. Looks much more promising now.