Skip to content

Commit af23b5b

Browse files
committed
perf: parallelize provenance and existence queries in DeltaQuery
Submit both SPARQL batch queries to _IO_EXECUTOR concurrently instead of running them sequentially.
1 parent 8523a56 commit af23b5b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/time_agnostic_library/agnostic_query.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -988,8 +988,10 @@ def run_agnostic_query(self) -> dict:
988988
entity_uris = set(self.reconstructed_entities)
989989
if not entity_uris:
990990
return {}
991-
prov_data = _batch_query_dm_provenance(entity_uris, self.config)
992-
existence_data = _batch_check_existence(entity_uris, self.config)
991+
prov_future = _IO_EXECUTOR.submit(_batch_query_dm_provenance, entity_uris, self.config)
992+
existence_future = _IO_EXECUTOR.submit(_batch_check_existence, entity_uris, self.config)
993+
prov_data = prov_future.result()
994+
existence_data = existence_future.result()
993995
output = {}
994996
for entity_str in entity_uris:
995997
snapshots = prov_data[entity_str]

0 commit comments

Comments
 (0)