Everyone has been raving about how much faster CF8 is than
previous versions. This got me very excited at first. Well, I've
been running CF8 on my development machine for a couple weeks now.
It's been painfully slow compared to CF7, but I've been putting up
with it thinking that I must be missing some crucial setting that
makes it fast. Well, I've checked every setting, tried every tweak,
uninstalled/reinstalled, you name it - but it was still slow.
So today I decided to run my own crude performance test. I
turned off all other software on my machine. I wrote a quick and
dirty app, borrowing some code from the app used in the CF8
Performance Whitepaper. I adjusted the number of iterations in the
loops so each test area would take about 2000 milliseconds on CF8.
Instead of measuring the times externally using a program
like JMeter, I did a getTickCount() style measurement around the
individual tests and outputted the results to the screen. To get
the actual times I used a custom timer class I wrote in Java that
uses JNI to get a far more accurate (sub-millisecond) timing. If
you're tempted to blame my timer, please remember that it was slow
performance in general that drove me to this. CF's built-in timing
mechanisms reflect the same slowness. I just used my own timer so I
could get a more accurate picture.
Both scenarios used the following server config.
- Blank application.cfm
- Trusted cache on
- Debug off
- Robust exceptions off
- All profilers and memory monitors, etc in CF8 were turned
off.
- All non-essential external programs were closed.
- Verity Search service was disabled.
- 512MB minimum/maximum JVM heap size.
I ran ran the test cycle 6 times on both versions of CF. Each
test cycle ran three blank tests (inclusion of a blank template) at
the start and end as a "control group." Below I took my best CF8
results and compared them with my worst CF7 results.
-------------------------
Best CF8 Times:
-------------------------
blank: 0.157 ms
blank: 0.136 ms
blank: 0.141 ms
cfparam: 2,113.305 ms
component: 2,137.075 ms
dateFunctions: 1,939.005 ms
evaluate: 1,791.225 ms
list: 1,849.384 ms
REFindAndNoCase: 1,937.942 ms
REReplaceAndNoCase: 2,609.426 ms
blank: 0.149 ms
blank: 0.138 ms
blank: 0.134 ms
Total Time: 14,378.217 ms
--------------------------
Worst CF7 Times:
--------------------------
blank: 0.081 ms
blank: 0.071 ms
blank: 0.070 ms
cfparam: 301.511 ms
component: 1,369.429 ms
dateFunctions: 197.770 ms
evaluate: 237.860 ms
list: 68.813 ms
REFindAndNoCase: 75.692 ms
REReplaceAndNoCase: 141.153 ms
blank: 0.043 ms
blank: 0.030 ms
blank: 0.030 ms
Total Time: 2,392.552 ms
So for me CF7 was about 600% faster than CF8. I'm now back on
CF7 and everything is fast again, but I really want to use CF8. I'm
looking for suggestions as to why it could have been so slow for
me. Have there been any common configuration issues that have
caused performance bottlenecks? I have tried all of the obvious
stuff. Turning on trusted cache, disabling debugging, giving more
memory to the JVM heap, reinstalling, etc. Nothing seems to work.
Next I'll probably try it on another machine, but I'm hoping for
some suggestions in the mean time.