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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SIEM] Attach VisibilitySensor to the TimelineBody instead of window #55620

Conversation

patrykkopycinski
Copy link
Contributor

@patrykkopycinski patrykkopycinski commented Jan 22, 2020

Summary

Currently, VisibilitySensor is attached to the window, so in effect, when we scroll the page, the Timeline table's rows are replaced by placeholders and it causes unnecessary re-renders of the components.
In my opinion, the expected behavior is to render placeholders only when we scroll the table and the row is stop being visible in the context of the table not in the context of the window.

Current:
kM3J4XYVq6

After the changes:
L75G8VmjPQ

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

Copy link
Contributor

@rylnd rylnd left a comment

Choose a reason for hiding this comment

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

Tried it out locally, and things are working as described! Event rows are rendered as the table's viewport changes (scrolling the table), not as the window's viewport does (scrolling the page).

I agree that this seems like the intended behavior, but I'll defer to someone who was here when this was written :)

@rylnd
Copy link
Contributor

rylnd commented Jan 23, 2020

@patrykkopycinski one other thought: we're unmounting these rows as they go out of view and thus throwing away all the work we just did to render it. Is this intentional (so that we always have "fresh" data)? If not, there's another optimization there.

Copy link
Contributor

@andrew-goldstein andrew-goldstein left a comment

Choose a reason for hiding this comment

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

@FrankHassanabad @rylnd and I reviewed this PR over a zoom with @patrykkopycinski , and we all agree with and appreciate the perf improvement in this PR. Thanks @patrykkopycinski 🙏
LGT(US)

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore release_note:skip Skip the PR/issue when compiling release notes Team:SIEM v7.6.0 v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants