-
Notifications
You must be signed in to change notification settings - Fork 101
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
Add Configurable Recursive Rendering to Performance Poetry #903
Conversation
6003718
to
411044e
Compare
f8eb139
to
b5e9831
Compare
The commit message should be a comment in the code somewhere. I don't understand this:
It looked like you were rendering children for breadth as well as depth, just that most of them ignored output. What do you actually mean by "provides a rendering"? |
All of them are 'rendered' from the POV of Workflow runtime, but only 1 path of the tree (the (n-1)th child of each depth) actually returns the rendering from |
|
b5e9831
to
2809f01
Compare
* simultaneously and tries to represent a scenario of multiple Workflows listening to the same | ||
* action. | ||
* [traceRenderingPasses], [traceFrameLatency], [traceEventLatency] are all flags to add | ||
* instrumentation for different performance measurements. |
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.
Do the other ones render null? Is that mimicking a pattern in our prod code? |
They don't render null, we just don't do anything with their renderings. |
@@ -50,9 +51,11 @@ class PerformancePoemsBrowserWorkflow( | |||
private val isLoading: MutableStateFlow<Boolean>, | |||
) : | |||
PoemsBrowserWorkflow, | |||
StatefulWorkflow<List<Poem>, State, Unit, OverviewDetailScreen>() { | |||
StatefulWorkflow<Pair<Pair<Int, Int>, List<Poem>>, State, Unit, OverviewDetailScreen>() { |
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.
Replacing Pair<Int, Int>
with a data class
or a typealias
and some extension methods would make this a lot easier to read.
val nextProps = renderProps.copy( | ||
first = renderProps.first.first - 1 to breadth | ||
) | ||
// ignore the siblings. |
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.
This comment confuses me. Is it about the noAction()
? If so, how about put it there and say "Ignore sibling output."? Be good to say why we're ignoring it too.
Customizable via intent. Depth is how many times to recursively render PerformancePoemsBrowserWorkflow in the tree. Breadth is how many times to repeate rendering of PerformancePoemsBrowserWorkflow horizontally in the tree. Only one path of the tree provides a rendering.
2809f01
to
96d5579
Compare
Customizable via intent.
Depth is how many times to recursively render PerformancePoemsBrowserWorkflow in the tree.
Breadth is how many times to repeate rendering of PerformancePoemsBrowserWorkflow horizontally in the tree.
Only one path of the tree provides a rendering.