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
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 ...

Observability Simplified: Combining User Experience, Application Performance & ...

Tech Talk Observability Simplified: Combining User Experience, Application Performance & Network ...

Event Series May & June: From Network Visibility to Service Intelligence

Unifying the Network: Moving from Alert Noise to Service Intelligence with Splunk ITSI In today’s hybrid ...