Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

coldfusion 9 cfc memory usage much bigger the coldfusion 8

46 views
Skip to first unread message

ElKlaaso

unread,
Jul 9, 2012, 12:35:42 PM7/9/12
to
This piece of code:

<cfscript>
for (j = 1 ; j LTE 500000 ; j = (j + 1))
{
dummyc = createObject("component","Dummy");
dummyc.dummyf();
}
</cfscript>

that creates objects like this one:

<cfcomponent output="false">
<cffunction name="dummyf" access="public" output="false" hint="" returnType="void">
</cffunction>
</cfcomponent>

Is using upto about 2 gigabytes of memory on CF9.
And almost nothing on CF8.

I analyzed a heap dump in eclipse memory analysis tool (MAT).

All the cfc's created in cf9 stay referenced under a java object and this
is why they are not garbage collected.
The cfc's in memory comprise of CFdummycomponent, variablescope and some other java objects. Because the references to them are kept, even though they are not referenced in coldfusion anymore, java cannot garbage collect them.

This basically means that batch processing can not be done with coldfusion anymore (using cfc's), unless a lot of memory is allocated.
On cf8 this was not a problem, because stuff not referenced in coldfusion was
not references in underlying java either anymore.

(cf8 did keep queries, cfsavecontent and some other stuff in memory, but i did not use this).

Can anybody confirm this or give me a solution?

I tried so much things, nothing helps, i tried almost all cf9 admin settings.
Im am creating a lot of cfc's in a batch process, this was no problem on cf8, but now we need 5,5g of memory for this batch process while in the past just needed 1g.

Thanks in advance,
Klaas-Jan Winkel

ElKlaaso

unread,
Jul 13, 2012, 7:28:53 AM7/13/12
to
On Monday, July 9, 2012 6:35:42 PM UTC+2, ElKlaaso wrote:
> This piece of code:
>
> &lt;cfscript&gt;
> for (j = 1 ; j LTE 500000 ; j = (j + 1))
> {
> dummyc = createObject(&quot;component&quot;,&quot;Dummy&quot;);
> dummyc.dummyf();
> }
> &lt;/cfscript&gt;
>
> that creates objects like this one:
>
> &lt;cfcomponent output=&quot;false&quot;&gt;
> &lt;cffunction name=&quot;dummyf&quot; access=&quot;public&quot; output=&quot;false&quot; hint=&quot;&quot; returnType=&quot;void&quot;&gt;
> &lt;/cffunction&gt;
> &lt;/cfcomponent&gt;
>
> Is using upto about 2 gigabytes of memory on CF9.
> And almost nothing on CF8.
>
> I analyzed a heap dump in eclipse memory analysis tool (MAT).
>
> All the cfc&#39;s created in cf9 stay referenced under a java object and this
> is why they are not garbage collected.
> The cfc&#39;s in memory comprise of CFdummycomponent, variablescope and some other java objects. Because the references to them are kept, even though they are not referenced in coldfusion anymore, java cannot garbage collect them.
>
> This basically means that batch processing can not be done with coldfusion anymore (using cfc&#39;s), unless a lot of memory is allocated.
> On cf8 this was not a problem, because stuff not referenced in coldfusion was
> not references in underlying java either anymore.
>
> (cf8 did keep queries, cfsavecontent and some other stuff in memory, but i did not use this).
>
> Can anybody confirm this or give me a solution?
>
> I tried so much things, nothing helps, i tried almost all cf9 admin settings.
> Im am creating a lot of cfc&#39;s in a batch process, this was no problem on cf8, but now we need 5,5g of memory for this batch process while in the past just needed 1g.
>
> Thanks in advance,
> Klaas-Jan Winkel

Found a workaround:

http://forums.adobe.com/message/4547382#4547382

ElKlaaso

unread,
Jul 13, 2012, 7:34:56 AM7/13/12
to
0 new messages