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

141189 alerts table performance #141385

Merged
merged 11 commits into from
Sep 27, 2022
Merged

Conversation

jcger
Copy link
Contributor

@jcger jcger commented Sep 22, 2022

Summary

Closes #141189

  • Access browser fields without loops
  • Toggle columns instead of ids in order to avoid running through all column elements

@jcger jcger added Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Alerting/Alerts-as-Data Issues related to Alerts-as-data and RuleRegistry labels Sep 22, 2022
@jcger jcger marked this pull request as ready for review September 23, 2022 10:35
@jcger jcger requested a review from a team as a code owner September 23, 2022 10:35
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@jcger jcger requested a review from semd September 23, 2022 10:35
Comment on lines +32 to +40
const getFieldCategoryFromColumnId = (columnId: string): string => {
const fieldName = columnId.split('.');

if (fieldName.length === 1) {
return 'base';
}

return fieldName[0];
};
Copy link
Contributor

Choose a reason for hiding this comment

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

I love this one, it simplifies the search to constant time 💯
The only exception to that criteria are runtime fields, but I don't think you have to deal with them on your side yet.

Copy link
Contributor

@semd semd left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for taking care of this @jcger 🚀

Copy link
Contributor

@XavierM XavierM left a comment

Choose a reason for hiding this comment

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

If @semd is happy, I am happy ;)

@kibana-ci
Copy link
Collaborator

💚 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
triggersActionsUi 1.1MB 1.1MB +73.0B

History

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

@jcger jcger merged commit 76b2624 into elastic:main Sep 27, 2022
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 27, 2022
* retrieve data without loops and work with columns instead of ids

* not found column when category doesnt exist

(cherry picked from commit 76b2624)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.5

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Sep 27, 2022
* retrieve data without loops and work with columns instead of ids

* not found column when category doesnt exist

(cherry picked from commit 76b2624)

Co-authored-by: Julian Gernun <julian.gernun@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting/Alerts-as-Data Issues related to Alerts-as-data and RuleRegistry release_note:enhancement Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.5.0 v8.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RAM] Alerts Table - improve populate columns performance
6 participants