Closed douglascayers closed 6 years ago
This actually isn't a problem. In Apex, as long as mapping Blob fields to other Blob fields then that doesn't consume as much Heap as one might expect. Closing this as there's not really a problem to deal with, Salesforce customers have been able to convert thousands of attachments of various sizes no issue.
This app converts attachments to files entirely in Apex and so in bound to the max heap size limits of async apex: 12MB.
Attachments originally could be 5MB each but later increased the limit to 25MB. For orgs with large attachments they can exceed this max heap limit easily and so we need a way to exclude them from the batch job and let the admin convert those separately, perhaps manually with Data Loader, https://help.salesforce.com/articleView?id=loader_content.htm&language=en_US&type=0
This new option would allow the admin to specify the max file size of attachments to consider in the batch job. For example, if using a batch size of 5 then the file size option might be set to 2MB for max potential of 10MB per batch, under the max heap size limit for apex.