SuiteTalk Performance Tip

As I’ve mentioned in my last couple of posts, I  just returned from SuiteWorld 2018. One of the sessions I attended, titled “High Performance and Highly Scalable NetSuite Solutions” pointed out something I’d missed as a SuiteTalk developer, something huge with regard to the performance of my app. 

Forget concurrency governance, indexing, and all the other things developers deal with when interacting with a database. Think for a second about the algorithm behind your integration. What does it do? If you are importing, you insert. And what happens if you need to restart an operation. How do you determine the correct restart point? If you’re synchronizing, you might be adding or updating. How do you know which action to perform?

I’m sharing this tip because it came up in multiple SuiteWorld sessions for developers. Here it is (cue the trumpets):

WriteResponse response = service.upsert(SalesOrder);

UPSERT – UPSERT – UPSERT

This one little method can reduce your interactions with the cloud by 50%. Since inserts fail if an entity or transaction already exists, upsert saves the read that precedes the write.

At the risk of being redundant, here’s the next tip.

WriteResponseList response_list = service.upsertList(ListOfSalesOrders.ToArray());

If you are not already familiar with the concept, you can batch calls to NetSuite. Then check the results of each response in the batch by doing something like this:

foreach (WriteResponse response in response_list.writeResponse) {}

If you are not utilizing both of these techniques, you should. They are game changers!

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s