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] Minimize plugin bundle size #64665

Merged
merged 1 commit into from
Apr 29, 2020
Merged

Conversation

rylnd
Copy link
Contributor

@rylnd rylnd commented Apr 28, 2020

Summary

Addresses #64589 to a reasonable extent; our plugin size is reduced from 579kB to 86kB. Approximately 70kB of the remaining size is due to our serviceNowActionType import, but #63450 should address that in part so I'm leaving that for now.

Before:
Overview_-_Kibana

After:
Overview_-_Kibana

Checklist

Delete any items that are not applicable to this PR.

For maintainers

1. we need our redux actions for our telemetry middleware, which:
2. require types from an index file, which:
3. includes all of our model types, and everything involved in them

By moving these types to a separate file and importing _that_instead, we
bypass inclusion of 2 and 3 in our plugin, which equates to ~550kB (of a
total of ~600kB).
@rylnd rylnd self-assigned this Apr 28, 2020
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

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

@rylnd rylnd requested review from XavierM and spong April 28, 2020 18:13
@rylnd rylnd marked this pull request as ready for review April 28, 2020 18:14
@rylnd rylnd requested a review from a team as a code owner April 28, 2020 18:14
@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

@rylnd rylnd added the release_note:skip Skip the PR/issue when compiling release notes label Apr 28, 2020
Copy link
Contributor

@yctercero yctercero left a comment

Choose a reason for hiding this comment

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

LGTM! Pulled down, got same smaller bundle size 🎉 Super minor - should we update the other places that KueryFilterQuery, SerializedFilterQuery, etc are being imported?

@rylnd
Copy link
Contributor Author

rylnd commented Apr 29, 2020

Super minor - should we update the other places that KueryFilterQuery, SerializedFilterQuery, etc are being imported?

@yctercero that's a good question! My thinking was that we only need special treatment for the imports in plugin.tsx ("plugin imports") and not anywhere else ("application imports"). While plugin imports can/should be minimized, application imports are currently all or nothing. If bundling of our application code changes we'll absolutely want to revisit that, but I think we're good for now 👍

@rylnd rylnd merged commit 3adab85 into elastic:master Apr 29, 2020
@rylnd rylnd deleted the siem_bundle_size branch April 29, 2020 18:01
rylnd added a commit to rylnd/kibana that referenced this pull request Apr 29, 2020
…4665)

1. we need our redux actions for our telemetry middleware, which:
2. require types from an index file, which:
3. includes all of our model types, and everything involved in them

By moving these types to a separate file and importing _that_instead, we
bypass inclusion of 2 and 3 in our plugin, which equates to ~550kB (of a
total of ~600kB).
@cnasikas
Copy link
Member

serviceNowActionType import will be handled on another PR. Issue: #64824

rylnd added a commit that referenced this pull request Apr 30, 2020
…64818)

1. we need our redux actions for our telemetry middleware, which:
2. require types from an index file, which:
3. includes all of our model types, and everything involved in them

By moving these types to a separate file and importing _that_instead, we
bypass inclusion of 2 and 3 in our plugin, which equates to ~550kB (of a
total of ~600kB).
jloleysens added a commit to jloleysens/kibana that referenced this pull request May 4, 2020
…bana into pipeline-editor-part-mvp-2

* 'feature/ingest-node-pipelines' of github.com:elastic/kibana: (90 commits)
  remove unused import
  address review feedback
  [Ingest pipelines] Cleanup (elastic#64794)
  [Ingest] Edit datasource UI (elastic#64727)
  [Lens] Bind all time fields to the time picker (elastic#63874)
  [Lens] Use suggestion system in chart switcher for subtypes (elastic#64613)
  Improve alpha messaging (elastic#64692)
  [Ingest] Allow to enable monitoring of elastic agent (elastic#63598)
  [Metrics UI] Fix alerting when a filter query is present (elastic#64575)
  skip flaky suite (elastic#64812) (elastic#64723)
  [Maps] do not display EMS or kibana layer wizards when not configured (elastic#64554)
  [Reporting/Test] Convert functional test code to Typescript (elastic#64601)
  make inserting timestamp with navigate methods optional with default true (elastic#64655)
  [EPM] Update UI to handle package versions and updates (elastic#64689)
  Minimize dependencies required by our telemetry middleware (elastic#64665)
  [Telemetry] oss api tests (elastic#64602)
  [ML] Adding endpoint capability checks (elastic#64662)
  Update jest config for coverage (elastic#64648)
  [SIEM][NP] Fixes bug in ML signals promotion (elastic#64720)
  share single data plugin bundle (elastic#64549)
  ...
@MindyRS MindyRS added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label Sep 23, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:SIEM v7.8.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants