networktocode / ntc-rosetta

The missing bridge between industry standard CLIs and YANG
https://ntc-rosetta.readthedocs.io/en/latest/index.html
Apache License 2.0
103 stars 23 forks source link

load datamodels once and only once and only when/if needed #19

Closed dbarrosop closed 5 years ago

dbarrosop commented 5 years ago

Before we would:

  1. Load a datamodel per driver
  2. Load all datamodels when loading ntc-rosetta

this lead to (a) wasting memory (b) wasting initialization time.

Now we:

  1. Load each datamodel once and only once, regardless of how many drivers use the same datamodel.
  2. Load datamodels when/if needed