Dashboards & Visualizations

Dropdown menu (speed??)

DTERM
Contributor

Can the speed of a form that utilizes a drop down menu be increased? I'm generating a menu based on a query and my users are complaining the application is too slow. I'd prefer not to input a static list into the dropdown.

If it helps any, here is the code:

<form class="formsearch">
<label>Top Products</label>
<searchTemplate>index=myapp supportGroup=$supportGroup$ | top 10 productName </searchTemplate> 

<fieldset>
    <input type="dropdown" token="supportGroup" searchWhenChanged="true">
        <label>Select Support Group</label>
        <populatingSearch fieldForValue="supportGroup" fieldForLabel="supportGroup">    <![CDATA[index=myapp supportGroup | top supportGroup]]></populatingSearch>
        <choice value="*">Any</choice> 
    </input>
    <input type="time">
         <default>Last 7 days</default>
    </input>
</fieldset>

  <row>
    <chart>
      <title>Top Product Names</title>
      <option name="charting.chart">pie</option>
      <option name="drilldown">all</option>
    </chart>
    <chart>
      <title>Top Product Names</title>
      <option name="drilldown">all</option>
    </chart>
  </row>
  <row>
    <table>
      <title>Top Product Names</title>
      <option name="drilldown">all</option>
    </table>
  </row>


</form>
Tags (1)
1 Solution

Ayn
Legend

What takes time is running the populating search - the 'speed' of the form will only ever be as fast as that search. So whatever you can do to make that go faster will make things better. Some suggestions:

  • Limit the timespan of the search as much as possible. Do you need to search 7 days worth of data or is it enough just to check, say, the last 12 hours?
  • Optimize the search. I'm no expert regarding the internals of how Splunk handles your query, but I think it's about as optimized as it can be. The thing I can think of is that you might want to try to use supportGroup="*" rather than just supportGroup. My guess though is that any difference in performance you get is neglectable. Still, it's worth a try.
  • Most importantly, if you really want to have a solution that scales, consider using summary indexing. This will speed up the populating search significantly, as Splunk can just grab the previously gathered stats right away rather than having to calculate it all in real-time. For more information, check the docs; for instance http://docs.splunk.com/Documentation/Splunk/4.2.3/Knowledge/Usesummaryindexing

View solution in original post

Ayn
Legend

What takes time is running the populating search - the 'speed' of the form will only ever be as fast as that search. So whatever you can do to make that go faster will make things better. Some suggestions:

  • Limit the timespan of the search as much as possible. Do you need to search 7 days worth of data or is it enough just to check, say, the last 12 hours?
  • Optimize the search. I'm no expert regarding the internals of how Splunk handles your query, but I think it's about as optimized as it can be. The thing I can think of is that you might want to try to use supportGroup="*" rather than just supportGroup. My guess though is that any difference in performance you get is neglectable. Still, it's worth a try.
  • Most importantly, if you really want to have a solution that scales, consider using summary indexing. This will speed up the populating search significantly, as Splunk can just grab the previously gathered stats right away rather than having to calculate it all in real-time. For more information, check the docs; for instance http://docs.splunk.com/Documentation/Splunk/4.2.3/Knowledge/Usesummaryindexing
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...