Archive2

Why ResultsReaderJson taking more time to parse a simple stream returned by oneshotsearch?

New Member

I am having an issue with consuming results using splunk API.

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 .

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.

Sample code
Args oneshotSearchArgs = new Args();
oneshotSearchArgs.put(SearchMode.OUTPUT_MODE.getMode(), OutputMode.JSON);
oneshotSearchArgs.put("count", 0);
inputstream is = service.oneshotSearch("myquery here", oneshotSearchArgs);
//this line takes more than time to execute
ResultsReaderJson resultsReader = new ResultsReaderJson(run);

Any Help would be greatly Appreciated.

Tags (1)
0 Karma
Reply
Don’t Miss Global Splunk
User Groups Week!

Free LIVE events worldwide 2/8-2/12
Connect, learn, and collect rad prizes
and swag!