Skip to content

Conversation

stevenyoungs
Copy link
Contributor

@stevenyoungs stevenyoungs commented May 29, 2025

Enable the filter optimizer to optimize filters the use logical operations of "one" or "or"

Note: this branch needs to be rebased once #2052 is merged into maintenance/gramps60 and onward merged into master

stevenyoungs and others added 30 commits May 1, 2025 08:23
…han the sub-filters logical_op when calculating the result.

Fixes #13799
Co-authored-by: Kari Kujansuu <[email protected]>
selected_handles \ all_handles is a superset of the potential result of a rule. Therefore symmetric_difference cannot be used reliably - it will potentially exclude handles which should be in the result.
@dsblank
Copy link
Member

dsblank commented May 30, 2025

The only way we can optimize "or" would be if all rules (at that level) have selected_handles.

@stevenyoungs
Copy link
Contributor Author

The only way we can optimize "or" would be if all rules (at that level) have selected_handles.

Yes I reached that conclusion as well and gave up for a bit. It may just be inverted unoptimized rules that are a problem when the logical op is "or". Let's see if my latest attempt passes the tests.....

@stevenyoungs stevenyoungs force-pushed the filter-optimizer-logical_op_or branch from 5e9eee2 to 5ba2f3f Compare June 1, 2025 11:35
@stevenyoungs stevenyoungs force-pushed the filter-optimizer-logical_op_or branch from 8c506ef to 927e1fe Compare June 1, 2025 15:16
@stevenyoungs stevenyoungs force-pushed the filter-optimizer-logical_op_or branch from c9fbf15 to 722935d Compare June 1, 2025 20:36
@stevenyoungs stevenyoungs changed the title Filter optimizer logical op "or" Filter optimizer logical op "or" and "one" Jun 1, 2025
@stevenyoungs stevenyoungs force-pushed the filter-optimizer-logical_op_or branch from 722935d to bd3c4e6 Compare June 1, 2025 21:46
@stevenyoungs stevenyoungs changed the base branch from maintenance/gramps60 to master June 1, 2025 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants