Good day, I am working on a Model with a high polygon count, 27,066,816 to be exact. Therefore I am having long loading times when switching between object, edit and sculpting mode. My goal is to sculpt by using a python script which is working, but is very slow due to the aforementioned switching between modes. Is there a possibility to reduce blenders downtime when switching modes?
The model is imported from an stl file and the only way I found to get enough vertices in the relevant places was by remeshing the entire object, therefore i can't reduce the polygon count. To preserve the objects details i also have to use a high detail for remeshing.
I also tried to use dyntopo but for some reason it did not just apply new topology to the area I sculpted but all over the object and therefore it is not an alternative right now.
CPU and RAM do not seem to cause any issues. I also tried disabling OpenGl but without any visible effect.
Edit: I have noticed that the RAM usage is going up after some time. I investigated this and it seems that every time my script switches to edit mode there is some memory leakage. After about 10 executions of my script, Blender occupied almost 60GB of RAM, where as the model originaly only used 12 GB of RAM. I have now disabled Undos completly but it didnt improve the situtation.
Edit: I have tried a different aproach at remeshing and reduced the vertex count down to 1,374,572. The speed improved significantly but the memory leak still persists. I know that this is a known issue but I havent found any solution to it yet. Any directions would be great.