You need to sign in to do that
Don't have an account?
s5
Error in Sheduled Batch apex programme
Hi Team,
I wrote one batch apex it was working fine in developer sandbox but if i move that code to Test sandbox it is showing error saying "Apex heap size too large".Please help me in this and below is the code i wrote.
Hi
That error means that you're using too much "memory" on the server, probably because of the amount of data you have in live. Can you write your code to not be "stateful"?
Wes
Hello,
This code can be optimized a lot, 1 major is optimazition would be:
* Use map to avoid double for loop.
- the inner List is iterated over again and again for same records.
Wesnolte is correct, also you can make collections/variables/instance null after they are used and are no longer in use.
Thanks
Ankit Arora
Blog | Facebook | Blog Page
Does this error comes on Test Method Execution when you move to Test SandBox?
Hi, I think error id due to the highlighted code:
Inner loop/list is Repeated over all the records which are not even related to outer loop.
Which is wrong, Using a Map there could solve the problem.
Also only fetch the registrants, whose Account are present in Scope.