Closed baobao917 closed 9 months ago
@baobao917 I've managed to reproduce this issue this morning. I have some ideas on how to streamline the process to make these updates from Flows more performant.
@baobao917 I'm nearly finished with the current round of optimizations, many of which I've pre-deployed to your sandbox. Hopefully I'll be able to wrap up this version today or tomorrow.
Thanks @jamessimone ! I saw v1.6.5 was related to this. Do you have an idea of what the batch size improvement should be now? The full 200? I saw that you noted that this was the low hanging fruit and that possible future enhancements possibly are coming as well....looking forward to it!
@baobao917 You can check out the Test - Apex Rollup Bulk Update James
flow I made in your sandbox - that test was with ~100 records. I can expand the date range that flow is using to ensure higher record counts continue to work.
I've created this issue b/c it is occurring more frequently now. Anytime I have to run an update on a batch of records of the rollup's child object, ApexRollup gets an Apex CPU time limit exceeded error. It occurs if it occurs in a scheduled flow or if I do a batch update of records directly. In my experience, I'm getting the error pretty consistently on any batches exceeding 70 (whereby the update operation isn't doing anything complicated...just populating a field value).
Discussed in https://github.com/jamessimone/apex-rollup/discussions/519