How to reduce heap size in salesforce

Look for heap size in debug logs. If heap size is approaching the limit, investigate it and refactor the code. Use the ‘Transient’ keyword with variables. It is used to declare instance variables that cannot be saved, and shouldn’t be transmitted as part of the view state for a … Use Limit methods . … … Read more

How to read salesforce debug log

To view the debug logs, from the setup option in Salesforce, enter ‘Debug Logs’ in the ‘Quick Find box’, then select ‘Debug Logs’. Once you select the Debug Logs, click the ‘View’ button to examine the log. Click ‘Download’ to download the logs as an XML file. To view a debug log, from Setup, enter … Read more