This repository has been archived by the owner on May 18, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only run SMFlatten if the model uses SMs
The state machine handling is slow and always runs. This disables that code unless the model actually contains a state machine.
- Loading branch information
7efbde0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this helps. We have the line
which will return an empty list for
flatSmLst
if there are no state machines. All later functions iterate over lists that derive fromflatSmLst
. Hence, they will "iterate" over empty lists if there is no state machine.7efbde0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't think I did profiling before turning this off? Just extractOnTrue takes 2% of total memory allocations (because it constructs a big list
otherLst
). DAEUtil.traverseDAE took 25% of total memory allocations despite there being a total of zero state machines :)https://trac.openmodelica.org/OpenModelica/ticket/4071#comment:8
7efbde0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I overlooked DAEUtil.traverseDAE. Pardon me, your change makes sense.