Open drewdaemon opened 1 year ago
Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations)
To reproduce this issue in Lens:
runtimeKeyword
field with the following value: emit(Math.random() + '');
Count of Records
x Top values of 700 of runtimeKeyword
with a stacked bar chartThe minimal amount of buckets I found to kick the slowness is 200 (buckets) x 200 (breakdown).
With partition chart this is very easy to produce as bucketed operations can be nested up to 3 levels, so even smaller numbers can apply where 3 of them are used. The bigger problem here is that when the user hits one of these case with one chart type, the suggestion bar underneath will produce multiple chart types with similar effects producing big performance issues for the whole editor.
cc @markov00 @nickofthyme
I see how this can lead to a performance issue, but in any case I feel that rendering a piechart or a barchart with such high cardinality of breakdown categories is clearly a bad practice and is a solution that should not be reached by the user. A numerous things can be done to speed up the implementation, but I don't feel we should spend our efforts to improve this bad case. My proposal is instead to spend time in:
A chart in the suggestions is rendered in an area of 132x82 pixels.
A possible set of preferable configurations for the suggestions:
The
fillColor
routine in the partition vis renderer is called for every partition. In high-volume partition charts (e.g. top 500 terms), this becomes quite slow, relative to other rendering routines.This slowdown can also show up in partition chart suggestions.
There's probably room to optimize
fillColor
to keep things snappy.The same issue could be also reproduced in cartesian charts. To reproduce it in Lens:
runtimeKeyword
field with the following value:emit(Math.random() + '');
Count of Records
xTop values of 700 of runtimeKeyword
with a stacked bar chartThe minimal amount of buckets I found to kick the slowness is 200 (buckets) x 200 (breakdown).