You need to sign in to do that
Don't have an account?
Harshitha Kudur
I am loading a huge xml to document object for parsing. But the heap size consumed in the enterprise edition is more than the developer edition.
I am loading a huge xml to document object for parsing. But the heap size consumed in the enterprise edition is more than the developer edition.
Following is the code snippet I used:
public class testhxmlclass
{
public testhxmlclass ()
{
}
public void LoadHTML()
{
try{
String mappingXML='';
StaticResource sr = [Select Id, body, Name from StaticResource where Name = testhxmlfile];
mappingXML = sr.Body.toString();
system.debug('Before :'+ string.valueof(Limits.getHeapSize()));
Dom.Document Doc = new Dom.Document();
Doc.load(mappingXML);
system.debug('After :'+ string.valueof(Limits.getHeapSize()));
}
catch(exception ex)
{
system.debug(ex.getmessage());
}
}
}
In developer edition following is the result:
Before: 1176801
After: 2283440
In Enterprise edition following is the result
Before:1176801
After: 2435076
What could be the reason?
Following is the code snippet I used:
public class testhxmlclass
{
public testhxmlclass ()
{
}
public void LoadHTML()
{
try{
String mappingXML='';
StaticResource sr = [Select Id, body, Name from StaticResource where Name = testhxmlfile];
mappingXML = sr.Body.toString();
system.debug('Before :'+ string.valueof(Limits.getHeapSize()));
Dom.Document Doc = new Dom.Document();
Doc.load(mappingXML);
system.debug('After :'+ string.valueof(Limits.getHeapSize()));
}
catch(exception ex)
{
system.debug(ex.getmessage());
}
}
}
In developer edition following is the result:
Before: 1176801
After: 2283440
In Enterprise edition following is the result
Before:1176801
After: 2435076
What could be the reason?
Try converting your document from xml to json, and loading that way.