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

[Exploratory view] Fix too many re-renders #103672

Merged
merged 1 commit into from
Jun 30, 2021

Conversation

shahzad31
Copy link
Contributor

Summary

Fixes issue where exploratory view wasnt rendering chart on first reload or first change,

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
observability 247 248 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
observability 478.6KB 478.9KB +304.0B

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


const { firstSeriesId, firstSeries: series, setSeries, allSeries } = useSeriesStorage();

const timeRange = combineTimeRanges(allSeries, series);
Copy link
Contributor

Choose a reason for hiding this comment

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

Here's one more area of optimization I see. This variable will cause LensComponent to rerender on every parent rerender. We can prevent this with useMemo, and it may be worth it for this heavy canvas based component.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes i think that totally makes sense, i will do the change

Copy link
Contributor

@dominiqueclarke dominiqueclarke left a comment

Choose a reason for hiding this comment

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

Smoke tests look good. Let me know what you think about the one performance suggestion. We can measure performance more accurately and take action after we get access to Profiler again.

@shahzad31 shahzad31 self-assigned this Jun 30, 2021
@shahzad31 shahzad31 marked this pull request as ready for review June 30, 2021 09:05
@shahzad31 shahzad31 added the Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability label Jun 30, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@shahzad31 shahzad31 added the release_note:skip Skip the PR/issue when compiling release notes label Jun 30, 2021
@shahzad31 shahzad31 merged commit 1a6cb46 into elastic:master Jun 30, 2021
@shahzad31 shahzad31 deleted the exp-view-rendering branch June 30, 2021 09:06
@shahzad31 shahzad31 added the auto-backport Deprecated - use backport:version if exact versions are needed label Jun 30, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 30, 2021
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Jun 30, 2021
Co-authored-by: Shahzad <shahzad.muhammad@elastic.co>
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jun 30, 2021
…-png-pdf-report-type

* 'master' of github.com:elastic/kibana: (178 commits)
  [test] Migrating to kbn_archiver from es_archiver - for the Maps app (elastic#103028)
  [Reporting] Reintroduce "ILM policy for managing reporting indices" (elastic#103850)
  [Security Solution][Endpoint] Allow activity log scrolling on small screens (elastic#103852)
  Allow zero (0) to unset unenroll_timeout field (elastic#103790)
  [TSVB] Metric count is depicted as `-` instead of 0 (elastic#103717)
  [Query] Es query/field base (elastic#103177)
  Remove add data button from nav (elastic#103810)
  Fix telemetry advanced setting style (elastic#103838)
  [Transform] Fix default naming and sorting fields suggestion for `top_metrics` agg (elastic#103690)
  [APM] use conventional error rate color for correlations (elastic#103500)
  Endpoint Telemetry: Agents Metrics + Policy Config / Response (elastic#102171)
  [Alerting] Fixed search results are not updated when search term is removed on Rules and Connectors page (elastic#103663)
  fix too many rernders (elastic#103672)
  [APM] Add “Analyze Data” button (elastic#103485)
  [Lens] Fix value popover spacing (elastic#103081)
  [TSVB] Fix TSVB is not reporting all categories of Elasticsearch error (elastic#102926)
  [SECURITY] Adds security links to doc link service (elastic#102676)
  Update dependency @elastic/charts to v31 (elastic#102078)
  [Security Solution][CTI] Investigation time enrichment UI (elastic#103383)
  Adds ECS guide to doc links service (elastic#102246)
  ...

# Conflicts:
#	x-pack/plugins/reporting/public/share_context_menu/register_pdf_png_reporting.tsx
@spalger spalger added the v7.15.0 label Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.14.0 v7.15.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants