I have a list of properties that is very large on Sundays.
Normally it works
fine Monday-Saturday. The larger listing (54mg and 65,000
listings are
causing a java.lang.OutOfMemoryError: GC overhead limit
exceeded.
What I would like to do is split the list in half and do it
in 2 runs. I am
just a little confused if this would work and if it would
reduce the load if
I create 2-3 functions and fire them in order.
I use cfhttp to get the pipe delimited list and convert it
into a query.
Will this work? If not, what do I need to change?
Function 1
<cffunction name="getResidential1" access="private"
returntype="void"
output="false" hint="">
<cfargument name="ResFile" type="string"
required="yes">
<cfhttp timeout="6600"
url="
http://www.bpoprosonline.com/assets/property/#ResFile#"
method="GET"
name="Property" delimiter="|" textqualifier=""
firstrowasheaders="yes" />
<cfloop from="1" to="30000" index="i">
<cfoutput query="Property">
<cfquery name="loopProperty" datasource="bpopros">
Insert Into Property (MLSNumber)
VALUES = #MLSNumber#
</cfquery>
</cfoutput>
</cfloop>
</cffunction>
Function 2
<cffunction name="getResidential2" access="private"
returntype="void"
output="false" hint="">
<cfargument name="ResFile" type="string"
required="yes">
<cfhttp timeout="6600"
url="
http://www.bpoprosonline.com/assets/property/#ResFile#"
method="GET"
name="Property" delimiter="|" textqualifier=""
firstrowasheaders="yes" />
<cfloop from="30001" to="#Property.RecordCount#"
index="i">
<cfoutput query="Property">
<cfquery name="loopProperty" datasource="bpopros">
Insert Into Property (MLSNumber)
VALUES = #MLSNumber#
</cfquery>
</cfoutput>
</cfloop>
</cffunction>