Skip to content

[Performance] Avoid doing more work than needed in ForwardTranslator #4704

@jmarrec

Description

@jmarrec

Issue overview

While working on #4700 I realized that my ZoneMixing object goes FOUR times though the translateZoneMixing in the case the translateZoneMixing returns boost::none. This is mostly because it's added to the list of iddObjectsToTranslate and because of that

https://github.com/NREL/OpenStudio/blob/develop/src/energyplus/ForwardTranslator.cpp#L3247-L3262

Current Behavior

We try to translate my object four times

Expected Behavior

Once is enough!

Possible Solution

Clean up the iddObjectsToTranslate, and probably eliminate that old block of code. Do that after the release though, we can't risk breaking stuff now.

Details

Environment

Some additional details about your environment for this issue (if relevant):

  • Platform (Operating system, version): all
  • Version of OpenStudio (if using an intermediate build, include SHA): 3.5.0-alpha

Context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions