Skip to content

Commit f68df03

Browse files
committed
STAC search use assets directly
Relate issue #15 After running profiling, I found that a large amount of time was spent in the python's deepcopy. The get_assets call returns a copy which we are iterating over. By using the assets directly we can avoid the copy step and save a bunch of overhead.
1 parent 6dfeec3 commit f68df03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/catalog_to_xpublish/searchers/stac_search.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def _parse_assets(
107107
dataset_info_dicts: Dict[str, Dict[str, Any]],
108108
) -> None:
109109
"""Adds all assets to the list + dict of datasets."""
110-
for child_name, child in pystac_obj.get_assets().items():
110+
for child_name, child in pystac_obj.assets.items():
111111
# make sure the item type is supported
112112
url_path = child.get_absolute_href()
113113
if url_path.endswith('/'):

0 commit comments

Comments
 (0)