avocado.core.tree: Cache TreeNode.environment
Usually we create single tree and then multiplex it's values. This
generates lots of TreeNode.environment calls. This patch caches
TreeNode.environment calls and returns last known version.
There is one drawback, in case you modify tree structure after calling
TreeNode.environment you must call TreeNode.set_environment_dirty,
otherwise you get the outdated results.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
Conflicts:
avocado/core/tree.py
Showing
想要评论请 注册 或 登录