I guess the functions slowing us down the most are either
- DB initialization (from YAML)
- Loading of cached DB (pickle)
- DB lookup for each instruction
- Dependency search in DiGraph
We need to profile this before making too much effort in optimizing any of those parts.