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 Jul 2, 2024
1 parent 235179d commit 4fb00ed
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 4fb00ed

Please sign in to comment.