Question about dynamic vs. standard record mode ac...
# suitescript
s
Question about dynamic vs. standard record mode access: Is it documented anywhere whether it’s more performant to use standard record mode or dynamic record mode? I would intuitively think standard was faster, but realized I don’t know and can’t find the answer. I could try and benchmark it, but that may not give me accurate results unless I use a really large dataset. I need to mass-create (probably via script), about 400,000 price plans and subscription change orders, and right now, using standard record mode, it’s kind of slow when doing a few individual records. I noticed that NS PS uses dynamic record mode in all of their SuiteBilling scripts, and wasn’t sure if that was just a style choice, or if it actually performs better somehow.
a
I don't have data to back this up, but given that dynamic mode effectively does extra work as it would in the UI, it stands to reason that it couldn't possibly faster than standard mode
a
I think it could be the opposite, dynamic mode sources values etc for all fields in synchronous mode, so I will incline to believe it would be slower.
a
... that doesn't sound like the opposite... unless I misunderstood? you: dynamic would be slower me: dynamic cannot be faster
a
@Anthony OConnor I miss read your comment, my bad, agree with you, dynamic should be at least technically or logically slower.
a
yeah i probably didn't phrase it well
s
this is what i suspected, so i don’t think i’ll bother testing our the dynamic mode. I have suspected for a while we have a SuiteBilling-related performance issue, as the creation, editing, and saving of SuiteBilling records takes a long time, longer even than modifying an Invoice or Customer, both of which have a tone of scripts and customizations deployed on them. I probably need to reach out to support as I feel that it should not take an average of 120-300 seconds (no that’s not a typo) per change order, but ironically I cannot reproduce those slow times through the UI, where it only takes seconds, which is partly why I thought dynamic mode may be faster.
a
yeah let us know what they have to say cos that sounds crazy slow
s
Yeah, and it only affects SuiteBilling records in scripts: subscriptions, change orders, usage, billing accounts. Nothing else is slow. And nothing is slow in the UI, so it’s puzzling.
Update on this: support agreed there is some defect affecting performance, and assigned the severity as U4. I’ll see how long it takes for them to fix it, but we told them the change orders need to be fully created before the 29th of March, which is only 18 days away
👍 1
well, this is both good and bad. NS support found the issue: A custom field on Subscription that sourced from a Price Plan saved search. That saved search used Subscription as the filter on Price Plan. Turns out, that’s terrible because it’s a field available on price plan, but not a stored field. It is itself a formula that pulls the subscription from the related subscription line. And given that we have over 123,000 price plans, every time we loaded a subscription record it had to run the equivalent of 123 thousand search/lookups within the larger saved search. They really should not make that field available on the saved search criteria and filters if using it is such a disaster. Some contractor we hired created that field and search, not realizing how bad it would be. The good news is we found the cause of the issue. The bad news is, it was caused by using standard functionality of Netsuite that just has terrible performance effects. I guess I’d say to everyone, beware the subscription field on price plan saved searches. Just don’t use it if you don’t need it.
a
🤯
wow thanks for following up with the root cause... glad you were able to figure it out