-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
core(tracehouse): allow child to start <1ms before parent #9786
Conversation
b6ab7fe
to
4cf372a
Compare
it('should handle nested tasks of the same name', () => { | ||
/* | ||
An artistic rendering of the below trace: | ||
████████████████TaskA██████████████████ |
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.
s/TaskA/SameName/g
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.
a few nits but yah lgtm
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.
LGTM2
nextTask.startTime - currentTask.startTime < 1000 && | ||
!currentTask.children.length | ||
) { | ||
// The parent started less than 1ms before the child, we'll let it slide by swapping the two, |
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.
should this be the opposite (parent<->child)? (at least in terms of what appears to be the case before the swap)
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.
maybe we should give up using 'parent' and 'child' in these swapping contexts 😆 this is written in terms of the actual structure of the trace events, not what we the current object structure might reflect.
maybe we take the same variable name approach from before and just slap actual
before these two?
!currentTask.children.length | ||
) { | ||
// The parent started less than 1ms before the child, we'll let it slide by swapping the two, | ||
// and increasing the duration of the parent. Below is an artistic rendition of this situation. |
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 is the rendition after the swap, right?
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.
errr, kind of. once we fix everything nextTask
and currentTask
labels will be switched so the diagram looks correct. at this exact moment in the code there is no heirarchy relationship whatsoever between nextTask and currentTask this diagram is attempting to take the true structure of things and apply the variable labels we currently have for them.
open to whatever explanation you think fits best and doesn't confuse me too :)
@brendankenny made a few comment tweaks I hope it makes sense! |
looks great! |
Summary
Addresses one of the 3 remaining cases for
Fatal trace logic error - child cannot end after parent
error.Related Issues/PRs
#7764, depends on #9785