<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Why ResultsReaderJson taking more time to parse a simple stream returned by oneshotsearch? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-ResultsReaderJson-taking-more-time-to-parse-a-simple-stream/m-p/473563#M100213</link>
    <description>&lt;P&gt;I am having an issue with consuming results using splunk API. &lt;/P&gt;

&lt;P&gt;I am using a oneshotsearch where the result is returned immediately less than a second and using ResultrenderJson for parsing and it takes for almost 20 - 30 seconds for 3 results . &lt;/P&gt;

&lt;P&gt;Sometimes if search a block of records for 1 day and it contains only 600~ records it will parse for hours and the search will only take  2 seconds.&lt;/P&gt;

&lt;P&gt;Sample code&lt;BR /&gt;
Args oneshotSearchArgs = new Args();&lt;BR /&gt;
oneshotSearchArgs.put(SearchMode.OUTPUT_MODE.getMode(), OutputMode.JSON);&lt;BR /&gt;
oneshotSearchArgs.put("count", 0);&lt;BR /&gt;
inputstream is = service.oneshotSearch("myquery here", oneshotSearchArgs);&lt;BR /&gt;
//this line takes more than time to execute&lt;BR /&gt;
ResultsReaderJson resultsReader = new ResultsReaderJson(run);&lt;/P&gt;

&lt;P&gt;Any Help would be greatly Appreciated.&lt;/P&gt;</description>
    <pubDate>Thu, 31 Oct 2019 06:42:45 GMT</pubDate>
    <dc:creator>santhoshpriyan</dc:creator>
    <dc:date>2019-10-31T06:42:45Z</dc:date>
    <item>
      <title>Why ResultsReaderJson taking more time to parse a simple stream returned by oneshotsearch?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-ResultsReaderJson-taking-more-time-to-parse-a-simple-stream/m-p/473563#M100213</link>
      <description>&lt;P&gt;I am having an issue with consuming results using splunk API. &lt;/P&gt;

&lt;P&gt;I am using a oneshotsearch where the result is returned immediately less than a second and using ResultrenderJson for parsing and it takes for almost 20 - 30 seconds for 3 results . &lt;/P&gt;

&lt;P&gt;Sometimes if search a block of records for 1 day and it contains only 600~ records it will parse for hours and the search will only take  2 seconds.&lt;/P&gt;

&lt;P&gt;Sample code&lt;BR /&gt;
Args oneshotSearchArgs = new Args();&lt;BR /&gt;
oneshotSearchArgs.put(SearchMode.OUTPUT_MODE.getMode(), OutputMode.JSON);&lt;BR /&gt;
oneshotSearchArgs.put("count", 0);&lt;BR /&gt;
inputstream is = service.oneshotSearch("myquery here", oneshotSearchArgs);&lt;BR /&gt;
//this line takes more than time to execute&lt;BR /&gt;
ResultsReaderJson resultsReader = new ResultsReaderJson(run);&lt;/P&gt;

&lt;P&gt;Any Help would be greatly Appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 06:42:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-ResultsReaderJson-taking-more-time-to-parse-a-simple-stream/m-p/473563#M100213</guid>
      <dc:creator>santhoshpriyan</dc:creator>
      <dc:date>2019-10-31T06:42:45Z</dc:date>
    </item>
  </channel>
</rss>

