Skip to content

yaml writer slows down execution #2499

@ChrisBNEU

Description

@ChrisBNEU

Bug Description

It appears that the yaml writer uses a lot of overhead during the execution of an rmg run. I ran a modified ethane pyrolysis input file with cProfile. The only thing I changed in rmg was I did not write a yaml file for rms every execution. I did that by commenting out this line in main.py:

self.attach(RMSWriter(self.output_directory))

the difference in execution times were:

  • with RMSWriter listener: 15 min 15 sec
  • without RMSWriter listener: 7min 35 sec

I attached the profiles and the rmg logs below. It is possible this becomes insignificant at longer execution times, I have not tried it. The Profiler graph shows it executing every time the model is enlarged, so it is also possible it gets worse with larger mechanisms.

How To Reproduce

Comment out the line specified above, then run the profiler on the input file I attached below (python-jl rmg.py -p input.py)

Installation Information

Describe your installation method and system information.

  • macOS 10.15.7
  • Installed from source via conda
  • RMG version information:
    • RMG-Py: 3.0.0-1437-gef83a1c0e
    • RMG-database: 3.1.0-616-g75fabcb6c

Additional Context

input file used:
input.py.zip

profiles:
profile_with_listener.pdf
profile_without_listener.pdf

rmg logs:
with_listener.log
without_listener.log

Metadata

Metadata

Assignees

Labels

bugbug which will never be closed by the actions bot

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions