[Piglit] [PATCH 2/2] framework: Replace deepcopy in summary feature

Dylan Baker baker.dylan.c at gmail.com
Wed Mar 2 16:58:29 UTC 2016


Quoting Gabriel Feceoru (2016-03-02 05:49:21)
> Deepcopy seems to be very slow and, for specific profiles (igt), causes errors.
> Replacing it with update() method fixes the above problems.
> 
> Signed-off-by: Gabriel Feceoru <gabriel.feceoru at intel.com>
> ---
>  framework/summary/feature.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/framework/summary/feature.py b/framework/summary/feature.py
> index fe2ea23..1ed8e64 100644
> --- a/framework/summary/feature.py
> +++ b/framework/summary/feature.py
> @@ -68,7 +68,8 @@ class FeatResults(object):  # pylint: disable=too-few-public-methods
>              options.OPTIONS.exclude_filter = exclude_filter
>              options.OPTIONS.include_filter = include_filter
>  
> -            profiles[feature] = copy.deepcopy(profile_orig)
> +            profiles[feature] = profile.TestProfile()
> +            profiles[feature].update(profile_orig)
>  
>              # An empty list will raise PiglitFatalError exception
>              # But for reporting we need to handle this situation
> -- 
> 1.9.1
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit

This is the only use of the copy module it looks like, with 'import
copy' removed:
Reviewed-by: Dylan Baker <baker.dylan.c at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20160302/ab5dec48/attachment.sig>


More information about the Piglit mailing list