# Major performance issues when using Timelion

**URL:** <https://discuss.elastic.co/t/major-performance-issues-when-using-timelion/182180>\
**Category:** Kibana\
**Tags:** timelion\
**Created:** [May 22, 2019, 9:00am UTC](https://discuss.elastic.co/t/major-performance-issues-when-using-timelion/182180 "2019-05-22T09:00:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![6tUBp3gwd9Zp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/6tubp3gwd9zp/32/45240_2.png) [@6tUBp3gwd9Zp](https://discuss.elastic.co/u/6tUBp3gwd9Zp)\
**Post date:** [May 22, 2019, 9:00am UTC](https://discuss.elastic.co/t/major-performance-issues-when-using-timelion/182180/1 "2019-05-22T09:00:16Z")

</div>

When using Timelion visualizations there are major performance issues. Most of the time giving no response or having very long response time (see Images). The sampling interval is set to auto and the max bucket count is 2000. Kibana Version is 6.7.2.

![timeout_timelion](https://us1.discourse-cdn.com/elastic/original/3X/e/9/e9ffed3ace580894ce6758a920d808d97342fe8c.png)  
 ![timeout_timelion_2](https://us1.discourse-cdn.com/elastic/original/3X/a/6/a6dedf0e0786ed2aca8ed7cb4c20be17131415bf.png)

The query looks like this:

```
.es(timefield=customtimestamp, metric=max:value).derivative().if(gt, 100, 100).if(lt, 0, 
0).subtract(.es(timefield=customtimestamp, q='value2:key', metric=count:value).if(gt, 100, 100).if(lt, 
0, 0)).label('name').bars(stack=true),
.es(timefield=customtimestamp, q='value2:key', metric=count:value).if(gt, 100, 100).if(lt, 0, 
0).label('name').bars(stack=true),
.es(timefield=customtimestamp, q='value2:key', metric=count:value).if(gt, 100, 100).if(lt, 0, 
0).label('name').lines(stack=false)

```

What could be done to improve performance / respone time without beefing up the hardware?

---

<div class="post-metadata">

**Author:** ![6tUBp3gwd9Zp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/6tubp3gwd9zp/32/45240_2.png) [@6tUBp3gwd9Zp](https://discuss.elastic.co/u/6tUBp3gwd9Zp)\
**Post date:** [May 22, 2019, 2:25pm UTC](https://discuss.elastic.co/t/major-performance-issues-when-using-timelion/182180/2 "2019-05-22T14:25:02Z")

</div>

So I found out specifying the index with

```
.es(index=foo*)

```

helps alot. Is there something else that would help?

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [May 23, 2019, 1:17pm UTC](https://discuss.elastic.co/t/major-performance-issues-when-using-timelion/182180/3 "2019-05-23T13:17:43Z")

</div>

You have a lot of calculations being done there and Timelion hits ES directly and by default it hits all indices on ES, so specifying the index is pretty much the best thing you can do other than making your chart simpler. You should look into Visual Builder as there is no active development being done on TImelion and there is a plan of phasing it out:  
[https://www.elastic.co/guide/en/kibana/current/timelion.html](https://www.elastic.co/guide/en/kibana/current/timelion.html)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 20, 2019, 1:17pm UTC](https://discuss.elastic.co/t/major-performance-issues-when-using-timelion/182180/4 "2019-06-20T13:17:44Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
