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

7.7.0 general performance problems, blocking IE11 #62238

Closed
LeeDr opened this issue Apr 1, 2020 · 13 comments
Closed

7.7.0 general performance problems, blocking IE11 #62238

LeeDr opened this issue Apr 1, 2020 · 13 comments
Assignees
Labels
blocker bug Fixes for quality problems that affect the customer experience regression Team:Operations Team label for Operations Team v7.7.0

Comments

@LeeDr
Copy link
Contributor

LeeDr commented Apr 1, 2020

Kibana version: 7.7.0-snapshot

Elasticsearch version: 7.7.0-snapshot

Server OS version: Windows 10

Browser version: IE11

Browser OS version: Windows 10

Original install method (e.g. download page, yum, from source, etc.): default dist zips

Describe the bug: Changes from 7.6 to 7.7.0 (new platform build?) have caused generally worse performance for Kibana loading and switching between apps in any browser. And it's significant enough to cause IE11 to either not load some apps (such as Canvas) or to frequently quit and reload Kibana.

Steps to reproduce:

  1. run Kibana 7.7.0 in IE11, compare to 7.6.2

Expected behavior: Even though we add features to Kibana we should also try to improve performance.

Screenshots (if relevant):

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

Any additional context:

This is very likely to impact Cloud deployments, and Reporting. But not confirmed yet.

@LeeDr LeeDr added bug Fixes for quality problems that affect the customer experience blocker Team:Operations Team label for Operations Team regression v7.7.0 labels Apr 1, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@LeeDr
Copy link
Contributor Author

LeeDr commented Apr 2, 2020

A couple of statistics about the change from the latest 7.6.2 to this 7.7.0 default distribution Windows zip files;

Version zip file size File count
7.6.2 291MB 99,003
7.7.0 367MB 163,977

A lot of the bundle names don't match up between releases. But here's some data on the ones that do;

Bundle 7.6.2 size 7.7.0 size % change
canvas.bundle.js 12152030 12265199 0.9%
commons.bundle.js 7629678 8379439 9.8%
apm.bundle.js 730165 2379977 226.0%
kibana.bundle.js 5318708 2168995 -59.2%
monitoring.bundle.js 951781 1023270 7.5%
uptime.bundle.js 372167 512140 37.6%
siem.bundle.js 199334 423438 112.4%
timelion.bundle.js 96378 97078 0.7%
maps.bundle.js 35120 37552 6.9%
status_page.bundle.js 32406 33800 4.3%
dashboardViewer.bundle.js 10300 10149 -1.5%
lens.bundle.js 8888 8812 -0.9%
core.bundle.js 8389 8311 -0.9%
dark_theme.bundle.js 2166 2058 -5.0%
light_theme.bundle.js 2167 2058 -5.0%

@spalger
Copy link
Contributor

spalger commented Apr 3, 2020

Expected behavior: Even though we add features to Kibana we should also try to improve performance.

This was a trade off that we decided to take because we really need to get rid of the optimizer in production, and our design to accomplish this included some code duplication that we were expecting. We expected that this might cause initial page load times to be slower, but it also meant that the assets would be more stable, Kibana would be more reliable, run with less memory required server side, and most importantly, be able to remove the loading indicator between apps. In order to get there we needed to increase the side of each bundle.

What we didn't know, or expect, was that the size of the bundles would grow so large that IE would stop working.

This has surprised us and lead to us pulling some emergency levers to reduce the overall size of the code (#62364) and a few that will reduce the size of the code initially loaded on a page (#62344, #62363, #62403, #62408, #62434, #62487, #62493).

I'm also working on reporting improvements so that in the 7.8 timeframe we will be able to analyze how big bundles are, and how changes we are making impacts the size of those bundles. Shortly after that's done we want to tie that into the reporting done on PRs so that PR authors will be confronted with the impact their PR has on the bundle sizes early and we won't be surprised by this down the road.

@mshustov
Copy link
Contributor

mshustov commented Apr 6, 2020

What we didn't know, or expect, was that the size of the bundles would grow so large that IE would stop working.

Right now we focus on an assumption that memory usage is the bottleneck for IE.
In theory, we might have another problem that could affect IE is a page load time. In v7.7 Kibana performs ~120 requests to load client-side assets, which might cause timeout error. If all our current improvements don't help much, we will switch to #55241 to improve load time.

@pgayvallet
Copy link
Contributor

As long as IE11 is a targeted browser, shouldn't we have a few windows CI nodes with IE11 to at least run some smoke tests on that environment? It seems like we currently have no way to have any idea of the performances / issues of running kibana on that specific browser, which cause the actual issues to be detected extremely late in our testing process, if not by end user themselves.

@tylersmalley
Copy link
Contributor

tylersmalley commented Apr 6, 2020

Action items from this mornings sync:

@tylersmalley
Copy link
Contributor

I am tracking the changes of Javascript assets which are loaded when accessing the home page:

https://docs.google.com/spreadsheets/d/16mB-yZAHoMBYgExXC5gdSjNVROrNCs0z6Dt7MEd8ilA/edit#gid=0

@spalger
Copy link
Contributor

spalger commented Apr 7, 2020

My quest to dedupe a lot of code by sharing the data plugin and a few others has led to many problems, and we're still unable to use IE reliably with the changes in place, so I'm going to start looking into reverting the new platform build system from 7.7. This change would go directly into 7.7 and not master, and would hopefully not cause many (if any) changes outside of the operations specific code, but will continue building everything in the legacy optimizer for now. This might not work, but it's feeling more and more like an option we need to take more seriously.

@LeeDr
Copy link
Contributor Author

LeeDr commented Apr 7, 2020

On the latest 7.7.0 snapshot from today COMMIT 797be9e on IE11. I tried to click through everything but didn't have APM data, SIEM data, etc. This is just a list of things I couldn't get to work. Once I hit one of these features and it causes a problem I generally have to close the IE11 browser and re-open it.

  • Canvas won't open
  • Dev Tools > Console - the default query shows a 200 response code but doesn't show anything in the results pane
  • Logs app and Metrics app both showed -

Error
TypeError: Object doesn't support this action
   at history[method] (https://localhost:5601/built_assets/dlls/vendors_1.bundle.dll.js:124:13986)
   at history[method] (https://localhost:5601/bundles/plugin/infra/5.plugin.js:1:40845)
   at Anonymous function (https://localhost:5601/bundles/plugin/infra/infra.plugin.js:6:159558)
   at confirmTransitionTo (https://localhost:5601/bundles/plugin/infra/infra.plugin.js:6:154758)
   at replace (https://localhost:5601/bundles/plugin/infra/infra.plugin.js:6:159366)
   at onMount (https://localhost:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:271:487154)
   at n.componentDidMount (https://localhost:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:271:485966)
   at vl (https://localhost:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:342:100771)
   at t.unstable_runWithPriority (https://localhost:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:350:3455)
   at Hi (https://localhost:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:342:45427)


@tylersmalley
Copy link
Contributor

797be9e is from two days ago and does not include the PR merged yesterday by Spencer.

Can you test with the most recent CI run on the 7.7 branch? You can get the tar.gz from the Google Cloud Storage Upload Report:

kibana-7.7.0-SNAPSHOT-linux-x86_64.tar.gz

@LeeDr
Copy link
Contributor Author

LeeDr commented Apr 9, 2020

I actually did test builds that @spalger provided and they looked much better. Canvas caused IE11 to restart once, but then loaded. And all the other things I knew were broke in IE11 worked. But I'll pull those latest ones and give another go.

But, if you have confidence and good code reviews, please don't wait on my testing to merge your fixes. I can already tell from Spalger's builds it's much better than before and we need other UI teams to be able to run their tests on either a snapshot build or new BC.

@spalger
Copy link
Contributor

spalger commented Apr 9, 2020

I think this is complete now that we've made so many small adjustments to make the bundle smaller, and remove specifically large items from the build. Thanks everyone for the help, but especially @restrry @tylersmalley @mistic @joshdover and @pgayvallet

Tyler is still going to look into tree-shaking, but I don't think there's any way we'll get it in during feature freeze. And Tiago might find the reason SIEM/APM bundles have grown so big, but we probably don't need to risk 7.7 any more with more changes here as IE is pretty darn usable as is.

@mistic
Copy link
Member

mistic commented Apr 29, 2020

I also want to mention that we have 2 merged prs (not backported into 7.7) that have reduced the apm and the siem bundles size #63269 and #63292

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker bug Fixes for quality problems that affect the customer experience regression Team:Operations Team label for Operations Team v7.7.0
Projects
None yet
Development

No branches or pull requests

7 participants