Getting Data In

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

santhoshpriyan
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
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk, and empower your SOC to reach new heights! Duration: 1 hour  Prepare to ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...