Skip to main content
Inspiring
June 6, 2017
Question

Compile Time SLOW on CF2016 (upgrading from CF9)

  • June 6, 2017
  • 4 replies
  • 4099 views

We're in  the process of migrating from CF9 to CF2016 and are running into really slow compile times. The app startup takes twice as long as before but our real problem is that  we have a lot of dynamically generated CFML that gets written to the VFS (Virtual File System) and then included.

This code, executed in a loop x 100 takes:

  • CF9        = 1420 ms.
  • CF2016  = 8643 ms.

I have tried with Java 1.8.0_112 and 1.8.0_131 and the result is the same.

Is there anything that we can do to speed up the compile time and is this a known issue with CF2016? Why was it so much faster on CF9?

Any help would be hugely appreciated as our upgrade is now stalled due to this issue.

This topic has been closed for replies.

4 replies

Charlie Arehart
Braniac
October 17, 2017

Brook, did your problem ever get resolved?

If it did not, I would be curious what would happen if you removed the two FR arguments in the jvm.config (javaagent and agentpath), but especially the agentpath as that enables the FR debugger feature in FR Ultimate. That alone should not cause impact, but in early versions of FR Ultimate it turned out it could.

So first, what version of FR are you on (or do you know what you were on then)? And even before answering that question, if you are still having the problem, when you go to the Debug>Exceptions page, do you show it enabled? Or do you see a big pink error warning of the need to turn on another JVM arg (which I can see you have not done) in order to do break on exceptions?

BTW, I ask about FR because you show about having the FR args in the jvm.config, but you do NOT show having the debug and jdwp args which CF would put in there, if you enabled the CF debugging feature. I point this out because for other readers who may come across this, if you see slow compile times, and you DO show those debug args in there, that could cause your poor compile-time performance. It turns out the java debugging feature trips over excessive exception processing which happens in most CF compilation. (It's a know issue to Adobe, but it's not something most people would ever see except when debugging features trip over it, trying to handle exceptions.

Indeed, this is the same reason that older versions of FR Ultimate also caused the problem (if the agentpath was implemented, which is how they implemented support for the FR Ultimate debugger, not needing the traditional java debug arg). Again, FR has been fixed to no longer cause that impact (unless you specifically add the other argument in the aforementioned pink warning box, shown in later versions of FR is you DO want to have FR's debugger "break on exceptions".)

/Charlie (troubleshooter, carehart. org)
brookdAuthor
Inspiring
December 1, 2017

Hey Charlie!

Haven't tested the performance of that code for a while. These JVM args from our DEV server which has fusionReactor ENT Edition v.6. In production we have the same version of FR and I see:

javaagent:C:/FusionReactor/instance/cfusion.cf2016/fusionreactor.jar=name=cfusion.cf2016,address=[masked]:8088

-agentpath:C:/FusionReactor/instance/cfusion.cf2016/frjvmti_x64.dll

In the JVM config, but I don't see the debug option in the FR admin page. Should I remove the javaagent and agentpath on our production server?

brookdAuthor
Inspiring
December 2, 2017

Hi, Brook. First, there is nothing wrong with having FR enabled in production. It is indeed a tool meant to be used in production, and it should never have any noticeable impact. But there can be features one enables in it that can have impact (and it usually warns you of that), or there can be bugs.

And I was referring to a combination of the two: a bug in an older FR version which caused slow compile times if you turned on a certain feature.

And where you said that your FR version was "fusionReactor ENT Edition v.6", that's a common misunderstanding. You saw that at the top of the "about" page (either when you opened FR, or if you went to the "About" menu option on the "FusionReactor" button at the top left). But what you quoted is the first line on that page, which is NOT your version. (It's an easy mistake to misinterpret it.)

Instead, look at the 4th line from the bottom. It may be something like 6.2.1 or 7.0.2 or 7.1.0 (the latest version, but I doubt you have that). My point was that being an older version, there was a time where if you enabled the "break on exceptions" feature of the FR debugger, it caused this problem. In later versions, it warns you need to add another JVM arg to enable that feature, meaning you are accepting that impact.

Finally, you said you did look for that, and "don't see the debug option in the FR admin page". It's not in the CF Admin. When I said "go to the Debug>Exceptions page", I meant in FusionReactor, using its buttons on the left. (And that "Debug" button will only appear to those using FusionReactor Ultimate edition.)

With all that said, perhaps if you now re-read what I wrote it will make sense. :-)


It all makes sense now, thanks Charlie!!

Community Manager
June 22, 2017

Hi brrokd,

Could you please share the code snippet and the jvm.config file with us on cf.install@adobe.com

Thank You,

Abhishek

brookdAuthor
Inspiring
June 22, 2017

Hello, my code snippet  IS shared in my previous reply, can you see it? I have included it again below the JVM config:

My JVM config file is below:

#

# VM configuration

#

# Where to find JVM, if {java.home}/jre exists then that JVM is used

# if not then it must be the path to the JRE itself

java.home=C:\\ColdFusion2016\\jre

#

# If no java.home is specified a VM is located by looking in these places in this

# order:

#

#  1) ../runtime/jre

#  2) registry (windows only)

#  3) JAVA_HOME env var plus jre (ie $JAVA_HOME/jre)

#  4) java.exe in path

#

# Arguments to VM

java.args=-server -Xms6024m -Xmx6024m -XX:+UseParallelGC -Xbatch -Dcoldfusion.home={application.home} -Duser.language=en -Dcoldfusion.rootDir={application.home} -Dcoldfusion.libPath={application.home}/lib -Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true -Dcoldfusion.jsafe.defaultalgo=FIPS186Random -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.JavaUtilLog -Djava.util.logging.config.file={application.home}/lib/logging.properties -javaagent:C:/FusionReactor/instance/VMDEBUG/fusionreactor.jar=name=VMDEBUG,address=8088 -agentpath:C:/FusionReactor/instance/VMDEBUG/frjvmti_x64.dll -Dcoldfusion.classPath={application.home}/lib/updates,{application.home}/lib,{application.home}/lib/axis2,{application.home}/gateway/lib/,{application.home}/wwwroot/WEB-INF/flex/jars,{application.home}/wwwroot/WEB-INF/cfform/jars

# -XX:+UseParallelGC

# -XX:NewSize=5200m -XX:MaxNewSize=5200m -XX:SurvivorRatio=6 -XX:TargetSurvivorRatio=4

# Comma separated list of shared library path

java.library.path={application.home}/lib,{application.home}/jintegra/bin,{application.home}/jintegra/bin/international,{application.home}/lib/oosdk/classes/win

# Comma separaed list of shared library path for non-window

java.nixlibrary.path={application.home}/lib

java.class.path={application.home}/lib/oosdk/lib,{application.home}/lib/oosdk/classes

Code Snippet to reproduce slow compile times:

<cfset filename             = 'wildcardparsing-#createUUID()#.cfm'>
<cfset tempfilepath         = 'ram://'>
<cfset tempIncludefilepath  = '/ram/'>

<!--- create CFML --->

<cfset cfml = '<cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif>'>

<cfset local.submissionTimerStart=gettickcount()>

<cfloop from="1" to="1000" index="index">

<cfset filename = 'wildcardparsing-#createUUID()#.cfm'>

    <cffile action="write"

    output="#cfml#"

    file="#tempfilepath##filename#" />

<cfsavecontent variable="parsedSTR">
<cfoutput>
<cfinclude template="#tempIncludefilepath##filename#" />
</cfoutput>
</cfsavecontent>

</cfloop>

<cfset local.submissionTimerEnd=gettickcount()>

<cfset local.runDuration=local.submissionTimerEnd-local.submissionTimerStart>

<cfoutput>

Compile Completed in #local.runDuration# ms...

</cfoutput>

brookdAuthor
Inspiring
June 22, 2017

I don't know why the JVM config is not coming through formatted, here it is again:

#

# VM configuration

#

# Where to find JVM, if {java.home}/jre exists then that JVM is used

# if not then it must be the path to the JRE itself

java.home=C:\\ColdFusion2016\\jre

#

# If no java.home is specified a VM is located by looking in these places in this

# order:

#

#  1) ../runtime/jre

#  2) registry (windows only)

#  3) JAVA_HOME env var plus jre (ie $JAVA_HOME/jre)

#  4) java.exe in path

#

# Arguments to VM

java.args=-server -Xms6024m -Xmx6024m -XX:+UseParallelGC -Xbatch -Dcoldfusion.home={application.home} -Duser.language=en -Dcoldfusion.rootDir={application.home} -Dcoldfusion.libPath={application.home}/lib -Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true -Dcoldfusion.jsafe.defaultalgo=FIPS186Random -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.JavaUtilLog -Djava.util.logging.config.file={application.home}/lib/logging.properties -javaagent:C:/FusionReactor/instance/VMDEBUG/fusionreactor.jar=name=VMDEBUG,address=8088 -agentpath:C:/FusionReactor/instance/VMDEBUG/frjvmti_x64.dll -Dcoldfusion.classPath={application.home}/lib/updates,{application.home}/lib,{application.home}/lib/axis2,{application.home}/gateway/lib/,{application.home}/wwwroot/WEB-INF/flex/jars,{application.home}/wwwroot/WEB-INF/cfform/jars

# -XX:+UseParallelGC

# -XX:NewSize=5200m -XX:MaxNewSize=5200m -XX:SurvivorRatio=6 -XX:TargetSurvivorRatio=4

# Comma separated list of shared library path

java.library.path={application.home}/lib,{application.home}/jintegra/bin,{application.home}/jintegra/bin/international,{application.home}/lib/oosdk/classes/win

# Comma separated list of shared library path for non-windows

java.nixlibrary.path={application.home}/lib

java.class.path={application.home}/lib/oosdk/lib,{application.home}/lib/oosdk/classes

Community Manager
June 18, 2017

Hi brookd,

Could you please share the jvm.config file and the code with the loop with us.

Thank You,

Abhishek

brookdAuthor
Inspiring
June 19, 2017

JVM config is basically default out of the box, but with the memory bumped up to 6GB.

The code is a simple loop, try it on CF9 vs CF2016 and you will see a huge difference in speed:

    <cfdump var="#getVFSMetaData('ram')#">

    <cfset filename                 = 'wildcardparsing-#createUUID()#.cfm'>

    <cfset tempfilepath             = 'ram://'>

    <cfset tempIncludefilepath      = '/ram/'>

    <!--- create CFML --->

    <cfset cfml = '<cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif><cfset x = 1><cfif x is 1>1<cfelse>2</cfif>'>

    <cfset local.submissionTimerStart=gettickcount()>

    <cfloop from="1" to="1000" index="index">

        <cfset filename = 'wildcardparsing-#createUUID()#.cfm'>

  <cffile action="write"

  output="#cfml#"

  file="#tempfilepath##filename#" />

        <cfsavecontent variable="parsedSTR">

        <cfoutput>

            <cfinclude template="#tempIncludefilepath##filename#" />

        </cfoutput>

        </cfsavecontent>

    </cfloop>

  <cfset local.submissionTimerEnd=gettickcount()>

  <cfset local.runDuration=local.submissionTimerEnd-local.submissionTimerStart>

  <cfoutput>

     Compile Completed in #local.runDuration# ms...

  </cfoutput>

    

BKBK
Braniac
June 20, 2017

Could you show us the JVM settings?

brookdAuthor
Inspiring
June 9, 2017

Anyone? The server is actually slow all around, decreased performance across the board - but the start up time  compile time has gone through the roof. Anyone else run into this?

BKBK
Braniac
June 15, 2017

I in fact expect CF2016 to be faster than CF9, all other factors considered. It is likely that, in your new installation, you unknowingly started some new processes in the background. Verify what CF2016 processes are running.

What are your JVM settings? Did you switch off client settings in the Administrator to prevent it from writing to the registry?