Skip to content

Commit

Permalink
Group Triples with same subject to improve performance. Sort reverse …
Browse files Browse the repository at this point in the history
…order to put pattern matches with more variables last.
  • Loading branch information
recalcitrantsupplant committed Jun 20, 2024
1 parent 1b7f988 commit 5893097
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions prez/services/query_generation/umbrella.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def __init__(
# for listing queries only, add an inner select to the where clause
ss_gpotb = []
if inner_select_tssp_list:
inner_select_tssp_list = sorted(inner_select_tssp_list, key=lambda x: str(x), reverse=True) # grouping for performance
ss_gpotb.append(TriplesBlock.from_tssp_list(inner_select_tssp_list))
if inner_select_gpnt:
ss_gpotb.extend(inner_select_gpnt)
Expand Down

0 comments on commit 5893097

Please sign in to comment.