mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Improve spy tab performance on Discover (#9590)
Switching between tabs in the spy panel takes a really long time in the Discover histogram. The root cause is that there is an expensive forced layout happening. It's expensive because the "response" tab includes all 500 hits from the search response which is a lot of content. This affects all the tabs because we're using ng-show instead of ng-if, meaning we're incurring the cost of layout on all that content even when it's not being shown. This PR switches to ng-if to speed up all of the tabs other than "Response". The response tab remains slow because the vis is re-rendered any time uiState changes, and when the vis is re-rendered it triggers forced reflows. This is a non-trivial issue to fix that Peter is already working on separately, so for now we'll settle for only speeding up the other tabs. Fixes https://github.com/elastic/kibana/issues/9464
This commit is contained in:
parent
cb67bc3e10
commit
899d560caf
1 changed files with 4 additions and 4 deletions
|
@ -10,25 +10,25 @@
|
|||
<i class="fa fa-danger"></i> Request Failed
|
||||
</div>
|
||||
|
||||
<div ng-show="spy.mode.name === 'request'">
|
||||
<div ng-if="spy.mode.name === 'request'">
|
||||
<label>
|
||||
Elasticsearch request body
|
||||
</label>
|
||||
<pre>{{req.fetchParams.body | json}}</pre>
|
||||
</div>
|
||||
|
||||
<div ng-show="spy.mode.name === 'response'">
|
||||
<div ng-if="spy.mode.name === 'response'">
|
||||
<label>
|
||||
Elasticsearch response body
|
||||
</label>
|
||||
<pre>{{req.resp | json}}</pre>
|
||||
</div>
|
||||
|
||||
<div ng-show="spy.mode.name === 'stats'">
|
||||
<div ng-if="spy.mode.name === 'stats'">
|
||||
<table class="table">
|
||||
<tr ng-repeat="pair in stats">
|
||||
<td>{{pair[0]}}</td>
|
||||
<td>{{pair[1]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue