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

[Logs UI] Speed up stream rendering using memoization #59163

Merged

Conversation

weltenwort
Copy link
Member

@weltenwort weltenwort commented Mar 3, 2020

Summary

This aims to be a quick performance improvement by memoizing the LogEntryRow component.

It's most noticeable when scrolling the stream view with the Chrome devtools open, but should benefit the production build as well. The peak frame duration dropped from almost three seconds to less than 500 milliseconds for me. This is still not great, but a good improvement for adding a few characters.

Review and Testing

  • I recommend ignoring whitespace changes during the review.
  • All interactions with the stream (hover, highlight, infinite scroll) should continue to work.

@weltenwort weltenwort added v8.0.0 Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services release_note:skip Skip the PR/issue when compiling release notes v7.7.0 labels Mar 3, 2020
@weltenwort weltenwort self-assigned this Mar 3, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

@weltenwort weltenwort marked this pull request as ready for review March 3, 2020 18:08
@weltenwort weltenwort requested a review from a team as a code owner March 3, 2020 18:08
@afgomez afgomez self-requested a review March 5, 2020 16:22
Copy link
Contributor

@afgomez afgomez left a comment

Choose a reason for hiding this comment

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

🎉! Let's ship this

@weltenwort
Copy link
Member Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@weltenwort weltenwort merged commit 1a548a1 into elastic:master Mar 5, 2020
@weltenwort weltenwort deleted the logs-ui-stream-speed-up-rendering branch March 5, 2020 23:19
weltenwort added a commit to weltenwort/kibana that referenced this pull request Mar 5, 2020
This aims to be a quick performance improvement by memoizing the LogEntryRow component.
weltenwort added a commit that referenced this pull request Mar 6, 2020
Backports the following commits to 7.x:
 - [Logs UI] Speed up stream rendering using memoization (#59163)
jloleysens added a commit to jloleysens/kibana that referenced this pull request Mar 6, 2020
…x-closed-index

* 'master' of github.com:elastic/kibana: (32 commits)
  [ML] Use Kibana's HttpHandler for HTTP requests (elastic#59320)
  [APM] Create settings page to manage Custom Links (elastic#57788)
  [Upgrade Assistant] Server-side batch reindexing (elastic#58598)
  completes navigation test (elastic#59141)
  [SIEM] Fixes dragging entries to the Timeline while data is loading may trigger a partial page reload (elastic#59476)
  [Reporting/Screenshots] Handle page setup errors and capture the page, don't fail the job (elastic#58683)
  [SIEM] [CASES] API with io-ts validation (elastic#59265)
  Use camelCase rather than snakeCase for plugin name (elastic#59461)
  [Maps] top term percentage field property (elastic#59386)
  Add custom action to registry and show actions list in siem (elastic#58395)
  [Search service] Add enhanced ES search strategy (elastic#59224)
  [Logs UI] Speed up stream rendering using memoization (elastic#59163)
  expand max-old-space-size for xpack jest tests (elastic#59455)
  Added possibility to embed connectors create and edit flyouts (elastic#58514)
  Revert "Temporarily disabling PR project mappings (elastic#59485)" (elastic#59491)
  Temporarily disabling PR project mappings (elastic#59485)
  [Endpoint] Fix alert list functional test error (elastic#59357)
  Rename status_page to statusPage (elastic#59186)
  Fix visual baseline job (elastic#59348)
  Extended AlertContextValue with metadata optional property (elastic#59391)
  ...

# Conflicts:
#	x-pack/plugins/upgrade_assistant/common/types.ts
#	x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_actions.ts
#	x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts
#	x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts
#	x-pack/plugins/upgrade_assistant/server/routes/reindex_indices/reindex_indices.test.ts
#	x-pack/plugins/upgrade_assistant/server/routes/reindex_indices/reindex_indices.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Logs UI Logs UI feature release_note:skip Skip the PR/issue when compiling release notes Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants