Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
Why does .getResults take so long?
Hi, everyone.
I have a search that ends up with about 10,000 results. The search is called by a RESTlet, and so to get all the results, I use .getResults() to retrieve them 1000 at a time. Unfortunately, this functions seems to take longer and longer the further I get into the result set. The first 1000 records (0 - 1000) take about 1 second to retrieve. Records 3000 - 4000 take about 4 seconds, records 9000 - 10,000 take about 10 seconds. Notice a pattern? It takes about 1ms per result regardless of whether that result actually ends up in the result set.
This may not sound like much, but when you add them up, retrieving all 10,000 records takes nearly a minute to finish, which is deadly when you have other web services that need to get this information and who have timeouts on their requests. Is there anything I can do? This search will likely only get more results in the future, which means it's just going to keep taking LONGER and longer and