Good question… Hmm. Maybe because you are sending the whole list of products and not just one at a time? I’m not sure why it would be so expensive if it’s just passing that along. Maybe try passing just unique ids as a list of text instead of the product object to see if that might reduce it?
I was thinking that as well, but then I’d need to ‘Do a search for’ for each of the UIDs, which I presume would also be expensive ( I thought it would be significantly more expensive than just passing all the products directly in the loop).
Rare case for looping. I’ve move all my recursive to schedule on a list and saved an average of 80% on WU for that. The only case I can see would be related to racing issue with nested data and delay between scheduled item couldn’t not avoid.
Every thing you send in will be fetched each time it’s in the list, that’s why it’s expensive. Instead, you send unique ids as list, on each loop do search for current ID as constraint so it’s an individual data request which is only 0.015 per item, so each loop is action cost 0.5 plus individual item fetch of 0.015 plus running of data manipulation of 0.6, so around 1.17 per loop.
Compare the above method to schedule on list. Schedule on list may be cheaper if bubble doesn’t charge the scheduler fee of 0.1 per backend workflow scheduled.
To avoid the 0.1 backend workflow scheduled fee, just use your app API to loop through instead of doing 5,000 items is something you’ll do often…if not, don’t bother.