I've been experimenting with the STL conversion process - using the
online conversion tool here:
https://github.com/raviriley/STL-to-OpenSCAD-Converter.
The output is an array of points which is fed to polygon in a module.
If you have a monolithic piece of code which includes the array points,
what you have is an OpenSCAD file which is impossible to edit, even a
small object has far too many points to be editable.
However, if you create a small 'wrapper' OpenSCAD file which uses <the intermediate file.scad>.
Then invoke the module name from the wrapper, e.g. object1 (); the array
is never loaded into OpenSCAD but is fed to the rendering engine. This
speeds up the handling of the STL object considerably.
I have an ancient 8 year old quad core i5 laptop with a mere 12GB of
physical RAM, running Ubuntu LTS 20.04, so its not the fastest. What I
have done is given it 20GB of swap.
My slowest F6 render takes 45 minutes on a bad day and creates a 37MB
stl, which takes 50 hours to print from a 98MB gcode, what kills the
machine is Vivaldi, not OpenSCAD.. When I had access to a new Windows
10 laptop with 32GB RAM and an 8 core i7 with 512GB SSD, the Ubuntu
machine was still faster when rendering.
HTH
Roger