-
Notifications
You must be signed in to change notification settings - Fork 123
Closed
Description
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.
Metadata
Metadata
Assignees
Labels
No labels