-
Notifications
You must be signed in to change notification settings - Fork 151
Allow path stitcher to work on SQLiteReader
#291
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Performance SummaryComparing base acb0fab with head ee936e1 on microsoft/[email protected]. For details see workflow artifacts. Note that performance is tested on the last commits with changes in Before
After
|
a552756
to
2a5b45f
Compare
Performance SummaryComparing base acb0fab with head a552756 on microsoft/[email protected]. For details see workflow artifacts. Note that performance is tested on the last commits with changes in Before
After
|
Performance SummaryComparing base acb0fab with head 2a5b45f on microsoft/[email protected]. For details see workflow artifacts. Note that performance is tested on the last commits with changes in Before
After
|
Performance SummaryComparing base acb0fab with head 8a3834c on microsoft/[email protected]. For details see workflow artifacts. Note that performance is tested on the last commits with changes in Before
After
|
Performance SummaryComparing base acb0fab with head b3bc09a on microsoft/[email protected]. For details see workflow artifacts. Note that performance is tested on the last commits with changes in Before
After
|
b3bc09a
to
2a5b45f
Compare
2a5b45f
to
db92a36
Compare
Performance SummaryComparing base f8477c5 with head db92a36 on typescript_benchmark benchmark. For details see workflow artifacts. Note that performance is tested on the last commits with changes in Before
After
|
graph: &StackGraph, | ||
partials: &mut PartialPaths, | ||
db: &mut Db, | ||
candidates: &mut C, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only API suggestion I can think of is to consider if this could/should be mut candidates: C
instead. I think you're always passing in a mut
ref to a temporary, in which case you can just pass in that temporary directly. It probably doesn't matter from a codegen perspective, though, so if you consider this shape to be more understandable I'm also good with keeping it as-is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this, but the SQLiteReader
implements Candidates
directly, and would be moved (and lost) by this change. So I'm going to leave it as-is.
This is to keep consistent with the `ForwardPartialPathStitcher` and it keeps to option open to introduce `Backward` versions in the future.
These changes add support for using `ForwardPartialPathStitcher` directly on a `SQLiteReader` (besides the already supported graph edges and `Database`). This required pushing the `StackGraph` + `PartialPaths` + `ToAppendable` values into the `ForwardCandidates` trait, to allow the candidates implementation to lazily load data during the stitching process.
db92a36
to
233e827
Compare
Performance SummaryComparing base 0fcb846 with head 233e827 on typescript_benchmark benchmark. For details see workflow artifacts. Note that performance is tested on the last commits with changes in Before
After
|
This PR makes changes to
ForwardPartialPathStitcher
and related types to add support for running the path stitcher directly on aSQLiteReader
. With this change, theForwardPartialPathStitcher
is the one and only path building implementation.Some changes that were made as part of this:
Candidates
toForwardCandidates
, which is in line with theForwardPartialPathStitcher
and would make it easier in the future if we ever get backward algorithms.SQLReader::clear
method for easier reuse of instances. It clears the cached data in the reader.ForwardCandidates
trait with the reponsibility to manage access to the graph and partial path arena. As a result, theForwardCandidates
instance is the only thing going into the stitcher, and replaces the explicitStackGraph
andPartialPaths
arguments. This was necessary to allow the candidates implementation to lazy load data during stitching.ForwardCandidates
errors throughForwardPartialPathStitcher
, so that loading errors can be reported to the caller.