Closed polomani closed 3 months ago
I encountered the same problem even without using Automation. I executed a flowsheet several 100 times with minute modifications to adjust several parameters in parallel. After a while DWSIM is getting slower and slower. I saved die simulation, closed it and started again. After restart i got the original speed again.
@polomani why are you using COM instead of calling .NET types and objects directly?
@DanWBR I use COM to connect to other applications also. This allows writing a more generic middleware code (where possible) as well as avoiding bundling all the different DLLs into the release artifact.
Is there a known issue with COM?
Describe the bug I noticed Automation3 getting very slow over time. I ran the script below, which opens the same model over and over and tries to run
CalculateFlowsheet2
on it. It takes the same amount of time to open the model each time (except the very first), but it gets a couple of % slower to solve it. If I run the process for hours, solving the flowsheet eventually takes 20+ seconds.To Reproduce
Any simplest flowsheet, E.g.: DWSIM-ShowerMixer-v1.dwxmz.zip
Run the C# code
Expected behavior The
CalculateFlowsheet2()
should take the same amount of time on the same model.Output
Desktop (please complete the following information):