Further optimisations
Description
This branch deals with adding further optimisations to reduce the time taken in bst show debian-stack.bst without considering how to change algorithms or representations in order to make life better.
This only deals with affecting how existing algorithms and functions work.
As such it should be fairly safe.
Changes proposed in this merge request:
_yaml.py: Only retrieve provenance in node_get() when needed_yaml.py: Reduce use of isinstance() in node_sanitize()_yaml.py: Remove use of isinstance() in {node,list}_{chain_,}copy_yaml.py: Reduce cost of node_final_assertions_context.py: Cache result of get_strict()
For reference, this full set of changes doesn't really affect RAM usage, but does improve CPU time from roughly six and a half minutes, down to roughly five and a half minutes.
The test-case i'm using is bst show debian-stack.bst for the performance profiling repo's stack, having first successfully built base-files/base-files.bst and with a full YAML cache in place.
Edited by Daniel Silverstone