It's rediculously expensive to send a Status through the status_lookup factory, it's much cheaper to return early, and doesn't really affect non Status lookups.
Signed-off-by: Dylan Baker <[email protected]> --- framework/status.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/framework/status.py b/framework/status.py index 1e974a1..dbf9e22 100644 --- a/framework/status.py +++ b/framework/status.py @@ -80,6 +80,11 @@ def status_lookup(status): does not correspond to a key it will raise an exception """ + # Don't go through this if what we've been passed already is a status, it's + # very expensive + if isinstance(status, Status): + return status + status_dict = { 'skip': SKIP, 'pass': PASS, -- 2.5.0 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
