You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As described in stac-utils/pystac-client#49, a lot of time is spent in the deepcopy for a large Item dict when deserializing to a pystac.Item. The deepcopy is done to avoid mutating the parameter dict, which I think is good practice, but also wholly unnecessary when you've just created the dict from e.g. reading from a file or deserializing from a HTTP response and are not planning on using the dict any further. In these cases, the deepcopy is only a performance hit with no benefit.
The goal of this issue is to introduce a parameter to to_dict methods that allow users to avoid copying the dict. This should be used in PySTAC codepaths such as from_file methods where the incoming dict is a temporary data structure.
The text was updated successfully, but these errors were encountered:
As described in stac-utils/pystac-client#49, a lot of time is spent in the deepcopy for a large Item dict when deserializing to a pystac.Item. The deepcopy is done to avoid mutating the parameter dict, which I think is good practice, but also wholly unnecessary when you've just created the dict from e.g. reading from a file or deserializing from a HTTP response and are not planning on using the dict any further. In these cases, the deepcopy is only a performance hit with no benefit.
The goal of this issue is to introduce a parameter to
to_dict
methods that allow users to avoid copying the dict. This should be used in PySTAC codepaths such asfrom_file
methods where the incoming dict is a temporary data structure.The text was updated successfully, but these errors were encountered: