Opened 7 years ago

Closed 3 years ago

Last modified 3 years ago

#4775 closed defect (fixed)

Poor performance of frontend translating models with Modelica.Media

Reported by: ulfsen Owned by: somebody
Priority: high Milestone: 1.19.0
Component: New Instantiation Version: v1.13.0-dev-nightly
Keywords: Cc:

Description

Hi,

a test with Modelica.Fluid.Examples.HeatExchanger.HeatExchangerSimulation shows a bad performance of the frontend in comparison to older releases.

1.9.7 = 17 seconds
1.13.0-dev-425-g5056d0b (64-bit) = 36 seconds

Additionally, when working with multicomponent media, e.g. multiple species like Modelica.Media.IdealGases.MixtureGases.SimpleNaturalGas by changing

package Medium = Modelica.Media.Water.StandardWaterOnePhase;

to

package Medium = Modelica.Media.IdealGases.MixtureGases.SimpleNaturalGas;

In 1.9.7 = 27 seconds and
1.13.0-dev-425-g5056d0b (64-bit) = 52 seconds.

Could somebody check where in the front-end is the problem? Unfortunately the new frontend is still in progress but I have a model with 6 heat exchangers and the frontend needs 33 seconds with 1.9.7 but over 180 seconds with the nightly v.1.13 which makes it quite unusable (see attached .zip-file).

Attachments (1)

frontend_bench.zip (19.5 KB ) - added by ulfsen 7 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by Adrian Pop, 7 years ago

The "bad" performance is known. The 1.13 front-end is handling replaceable in a more correct way, creating a unique scope whenever a replaceable model or component is used. The problem with that is that you have to redo instantiation for several classes. The 1.9.7 did not create unique scopes but that has the potential to basically be plain wrong in some cases because modifiers were lost.

We really hope to have a usable new front-end soon enough that will resolve these issues once and for all.

by ulfsen, 7 years ago

Attachment: frontend_bench.zip added

comment:2 by Adrian Pop, 7 years ago

Which model from the .mo file did you use for the benchmark?

comment:3 by Adrian Pop, 7 years ago

Found the answer: frontend_bench.simple. I'll do some quick tests.

comment:4 by Per Östlund, 3 years ago

Component: FrontendNew Instantiation
Milestone: Future1.18.0
Resolution: fixed
Status: newclosed

The HeatExchangerSimulation model takes 1.45s to flatten with the new frontend, compared to 18.04s with the old frontend. I think that's good enough to close this ticket.

comment:5 by Francesco Casella, 3 years ago

Milestone: 1.18.01.19.0
Note: See TracTickets for help on using tickets.