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

[Lens] Avoid to compute over time suggestion for expensive configurations #115932

Merged
merged 9 commits into from
Nov 3, 2021

Conversation

dej611
Copy link
Contributor

@dej611 dej611 commented Oct 21, 2021

Summary

Fixes #112229

This PR attempts to improve perceived performance of the Lens editor excluding some suggestion computation for expensive configurations.
Unit tests have been added as well.

The terms threshold hardcoded is 5 as in the issue.

Screenshot 2021-10-21 at 14 53 03

Screenshot 2021-10-21 at 14 53 14

Screenshot 2021-10-21 at 14 53 54

Screenshot 2021-10-21 at 14 54 14

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@dej611 dej611 added release_note:enhancement Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens v8.1.0 labels Oct 21, 2021
@dej611
Copy link
Contributor Author

dej611 commented Oct 21, 2021

@elasticmachine merge upstream

@dej611
Copy link
Contributor Author

dej611 commented Oct 25, 2021

@elasticmachine merge upstream

@dej611 dej611 marked this pull request as ready for review October 25, 2021 12:29
@dej611 dej611 requested a review from a team as a code owner October 25, 2021 12:30
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors (Team:VisEditors)

@dej611
Copy link
Contributor Author

dej611 commented Oct 26, 2021

@elasticmachine merge upstream

@@ -21,6 +21,7 @@ import {
getExistingColumnGroups,
isReferenced,
getReferencedColumnIds,
hasTermsFunctionWithHighSize,
Copy link
Contributor

@mbondyra mbondyra Oct 27, 2021

Choose a reason for hiding this comment

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

nit: I am not convinced to this name, but this is the best I could come up with

Suggested change
hasTermsFunctionWithHighSize,
hasTermsWithManyBuckets,

Copy link
Contributor

@mbondyra mbondyra left a comment

Choose a reason for hiding this comment

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

Works as expected, tested on FF 🆗

@dej611
Copy link
Contributor Author

dej611 commented Oct 28, 2021

@elasticmachine merge upstream

@dej611
Copy link
Contributor Author

dej611 commented Nov 2, 2021

@elasticmachine merge upstream

@dej611
Copy link
Contributor Author

dej611 commented Nov 2, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
lens 953.9KB 954.1KB +182.0B

History

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

@dej611 dej611 added the backport:skip This commit does not require backporting label Nov 3, 2021
@dej611 dej611 merged commit eb9262d into elastic:main Nov 3, 2021
@flash1293 flash1293 added v7.17.0 v8.0.0 and removed backport:skip This commit does not require backporting labels Jan 14, 2022
flash1293 pushed a commit to flash1293/kibana that referenced this pull request Jan 14, 2022
…ions (elastic#115932)

* ⚡ Avoid over time suggestion if too expensive

* ✅ Add unit tests

* 👌 Integrate feedback

Co-authored-by: Kibana Machine <[email protected]>
(cherry picked from commit eb9262d)
flash1293 pushed a commit to flash1293/kibana that referenced this pull request Jan 14, 2022
…ions (elastic#115932)

* ⚡ Avoid over time suggestion if too expensive

* ✅ Add unit tests

* 👌 Integrate feedback

Co-authored-by: Kibana Machine <[email protected]>
(cherry picked from commit eb9262d)
@flash1293
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.0
7.17

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

flash1293 added a commit that referenced this pull request Jan 14, 2022
…ions (#115932) (#123020)

* ⚡ Avoid over time suggestion if too expensive

* ✅ Add unit tests

* 👌 Integrate feedback

Co-authored-by: Kibana Machine <[email protected]>
(cherry picked from commit eb9262d)

Co-authored-by: Marco Liberati <[email protected]>
flash1293 added a commit that referenced this pull request Jan 14, 2022
…ions (#115932) (#123022)

* ⚡ Avoid over time suggestion if too expensive

* ✅ Add unit tests

* 👌 Integrate feedback

Co-authored-by: Kibana Machine <[email protected]>
(cherry picked from commit eb9262d)

Co-authored-by: Marco Liberati <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lens] Omit "over time" suggestion for expensive configurations
5 participants