Feb 22, 2022, 11:00 PM – Feb 23, 2022, 12:00 AM (UTC)
Salesforce Developer Group, Denver, United States
By retrieving a heap-manageable chunk of the file at a time and combining on the client side, we are able to work within the apex heap limits.
The dreaded Salesforce governor! Have you ever needed to work with large files in apex, only to be harshly and suddenly shut down by the apex governor due to HEAP_LIMIT_EXCEEDED?
Consider this customer use case: Salesforce should callout to retrieve a 20MB file using service account credentials for authentication and make it available to download to the user. A client-side callout is problematic for several reasons, mainly security. A callout from apex would halt attempting to manage a file of this size.
Enter the chunking pattern! By retrieving a heap-manageable chunk of the file at a time and combining on the client side, we are able to work within the apex heap limits.
In this session we review the problem statement, review several options to overcome the apex heap, showcase the chunking pattern, show its elegance and simplicity, and finally review a customer implementation recently where this was used.
7Summits
Technical Architect
7Summits
Salesforce Developer
February 22 – 23, 2022
11:00 PM – 12:00 AM (UTC)
Welcome and announcements |
Presentation |
CONTACT US