Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up LCA check #4754

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Draft

Speed up LCA check #4754

wants to merge 1 commit into from

Conversation

ChrisPenner
Copy link
Contributor

@ChrisPenner ChrisPenner commented Mar 6, 2024

See #4753 ;

This rewrites the in-haskell LCA detector to pure SQLite.

Not sure how well tested this function is right now, and don't have time to work on this since it's just something I noticed while fixing bugs, so I'll just leave this here in case someone has time to look at it 馃馃徏

@ChrisPenner ChrisPenner changed the base branch from trunk to cp/speed-up-before-check March 6, 2024 19:55
Copy link
Contributor

mergify bot commented Mar 6, 2024

鈿狅笍 The sha of the head commit of this PR conflicts with #4753. Mergify cannot evaluate rules on this PR. 鈿狅笍

Comment on lines +2762 to +2770
WITH x_ancestors(id) AS (
$selectAncestorsOfX
), y_ancestors(id) AS (
$selectAncestorsOfY
) SELECT id FROM (
SELECT id FROM x_ancestors
INTERSECT
SELECT id FROM y_ancestors
) LIMIT 1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested this, (maybe I need a table alias?)

Not sure there's any guarantee of correct row order coming out of an INTERSECT, so should probably find a way to do that or we might not get the LEAST common ancestor.

Base automatically changed from cp/speed-up-before-check to trunk March 8, 2024 18:17
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.

None yet

1 participant