Im trying some of the heap size management suggestions but it's a slow process... I want to post some coe in hope of someone making a suggestion ...
I'm analyzing data against scenarios - and the analysis is somewhat complex, but not terrible. However when I try to run a scenario against 1000 different data sets... I crash my server,
I've got a sample size of 100000 data sets - and need to run scenarios against this set - I find that I can loop 10-20 set, and then the system eats itself... The JVM memory climbs to max.
I have to clear component cache and run the GC from the server monitor to get the memory usage down, but when I run the loop again - it soon climbs out of control.
<cfscript>
x = 20;
obj = createObject( 'component', 'b' );
d = obj.insertData( FORM.DATA );
s = obj.insertScenario( FORM.SCENARIO );
Xscenarios = obj.getXscenarios( s, d, x );
// analyze x
for( i=1; i <=arrayLen( Xscenarios ); i++ ) {
a = obj.analyze( Xscenarios[i], s );
}
</cfscript>
Each analysis takes about 3 seconds....
Any suggestions?
How do I force GC after each loop? Do I want to? Should I?