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

[Maps][File upload] Fix lag issue on add of es doc layer for uploaded data #41540

Merged
merged 2 commits into from
Jul 19, 2019

Conversation

kindsun
Copy link
Contributor

@kindsun kindsun commented Jul 18, 2019

Resolves #41493. EuiCodeBlock has an option to specify the language. The language was correctly specificied as json by #39429, however app performance deteriorated considerably as json responses grew in size. Language highlighting is performed by the highlight.js lib. It's not clear at this point if this is a json-specific issue or just a general optimization opportunity for the highlight lib.

Moving forward, we might consider whether or not these lengthy json responses are useful or not and consider revising, but for now it seems like the best option is to just remove the json highlighting and retain the unhighlighted responses as it was before.

Using the dataset below, before removing language="json" on both EuiCodeBlocks, the step between index completion and adding the layer took ~29 seconds. After removing these attributes, it took ~1-2 seconds

ne_10m_populated_places.json.tar.gz

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis

@kindsun kindsun added the v7.4.0 label Jul 18, 2019
@nreese
Copy link
Contributor

nreese commented Jul 19, 2019

slowed down caused because EuiCodeBlock renders all of the DOM elements even those that are off screen. Need to implement elastic/eui#1208 to fix this performance problem and keep json styling enabled.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@kindsun
Copy link
Contributor Author

kindsun commented Jul 19, 2019

retest

Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

lgtm as fix until component is virtualized and there is not a performance penalty for setting language on large blocks of code.
code review

@elasticmachine
Copy link
Contributor

💔 Build Failed

@kindsun
Copy link
Contributor Author

kindsun commented Jul 19, 2019

retest

@thomasneirynck thomasneirynck self-requested a review July 19, 2019 15:46
@elasticmachine
Copy link
Contributor

💔 Build Failed

@kindsun kindsun added the release_note:skip Skip the PR/issue when compiling release notes label Jul 19, 2019
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@kindsun kindsun merged commit e6524bc into elastic:master Jul 19, 2019
kindsun pushed a commit to kindsun/kibana that referenced this pull request Jul 19, 2019
kindsun pushed a commit to kindsun/kibana that referenced this pull request Jul 19, 2019
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jul 22, 2019
…b-panel-for-stopping-jobs

* 'master' of github.com:elastic/kibana: (58 commits)
  [DOCS] Timelion cleanup (elastic#41381)
  [Docs] Add simple phrase highlighting to Logs UI (elastic#41610)
  [Maps] Rename modules for clarity (elastic#41608)
  [Monitoring] Metricbeat migration net new user experience (elastic#39832)
  [Maps] Only color legend icon with dynamic color when dynamic config is complete (elastic#41607)
  [TSVB] [Markdown] markdown section do not render after change data parameter (elastic#41576)
  [Vega] (Step 2) Shim new platform - renaming vega -> vis_type_vega (elastic#41565)
  update dark mode tsvb test (elastic#41618)
  [i18n] .i18nrc file as the source of truth and enhance tooling (elastic#39774)
  Reactify Top Nav Menu (kbn_top_nav) (elastic#40262)
  fix(code/frontend): should update search results if search options change (elastic#41232)
  Use kibana-ci-proxy-cache for chrome and gecko drivers (elastic#41581)
  [SIEM] Fix draggables to work with escapeId for the ML severity column (elastic#41621)
  [Canvas] Updates esdocs default count to 1000 (elastic#41604)
  [Uptime] Fix duration chart for Safari (elastic#41619)
  [Canvas] Restores "Today" as a quick time range in time filter (elastic#41528)
  docs: lowercase app (elastic#41612)
  [Code] Update git repository update frequency (elastic#41541)
  Remove language=json on code blocks due to performance hit (elastic#41540)
  [DOCS] Update anchors and links for Elasticserach API relocation. (elastic#41372)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation Feature:File Upload release_note:skip Skip the PR/issue when compiling release notes v7.3.1 v7.4.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Maps][File upload] GeoJSON import taking much longer (or crashing) when adding indexed source
3 participants