sunspec / pysunspec2

SunSpec Python library for interfacing with SunSpec devices.
Apache License 2.0
57 stars 21 forks source link

Add cache for get_model_defs to save disk I/O #70

Open jmmgenerac opened 2 years ago

jmmgenerac commented 2 years ago

Use a cache for model definitions to reduce disk I/O when the same model definition is loaded multiple times.

jmmgenerac commented 2 years ago

This change results in a ~300-fold increase in speed when loading the same model 1000 times repeatedly.