ColdFusion Muse

Cfdocument and Performance

Mark Kruger February 16, 2006 5:16 PM Coldfusion MX 7, Coldfusion Tips and Techniques Comments (8)

CF Muse Reader Asks:
I am using CFMX7 on Windows 2003. We are seeing some serious processor peaks when the Cfdocument tag takes off to write out a report. We have the latest hot fixes in place...any suggestions?

Cfdocument is a new weapon in the Coldfusion arsenal. It's not without it's detractors, but personally I think it is splendid for what it can do. When it comes to performance, however, there are a number of things to keep in mind. If you think about what Cfdocument is being tasked to do under the hood and I'm sure you could come up with a few as well. Since it is my blog, we might as well work from my list...

Read More
  • Share:

Crashing Your Server in an Infinite Number of Steps

Mark Kruger February 15, 2006 2:24 PM Coldfusion MX 7, Coldfusion Tips and Techniques Comments (2)

Infinite loops are great fun. Technically an infinite loop is one with no hope of ever stopping. In the old days(1995) I worked for an outfit with a database product for salvage yards. The whole thing was written in MUMPS and everything was done through a terminal. The first program I ever wrote myself was a "spinner" program. It ran on the terminal and produced the following characters 1/2 second apart - "/,|,-,\,|" the result was a little spinning widget on the terminal. I added some text that said "rebuilding dataset, please wait". Whenever we were working on something and needed a way to keep folks from hassling us with new issues we would put it up on the screen. It looked like it was really doing something. With an http request it's a different story however...

Read More
  • Share:

Watch out for Coldfusion Mappings When Using onReqest( )

Mark Kruger January 27, 2006 5:19 PM Coldfusion MX 7, Coldfusion Tips and Techniques Comments (10)

I love using the application.cfc file instead of application.cfm. The cfc approach encapsulates several events inside of automatically fired functions that formerly required "hand coding". For example, I used to check to see if application vars existed and set them if they did not. This required thinking about locking and testing one or more variables for existence (isDefined() or structKeyExists()). Using Application.cfc means this job is handled by the onApplicationStart( ) function. One function that belongs to Application.cfc deserves a bit more attention - the onRequest( ) function. Here's an example from a webtop application that forces login.

Read More
  • Share:

CFCHART Workaround for labeling horizontal charts

Mark Kruger December 29, 2005 11:02 AM Coldfusion MX 7 Comments (1)

This is a nice tip from Dan Switzer on a fix for a tricky cf chart labeling problem. Sometimes when using an overlapping horizontal bar chart, the labels fail to appear or go missing. In this example from Robi Sen, the first and third labels are there but the middle label is missing.

Read More
  • Share:

Flash Remoting on CFMX7 Multiple Instances

Mark Kruger November 17, 2005 11:32 AM Coldfusion MX 7, Flash Remoting Comments (0)

If you use flash remoting on multiple sites on the same server you have probably had to configure the JrunScripts virtual directory. On the standard edition this virtual directory points to the folder <%cfusionmx7%>/runtime/lib/wsconfig/1. When you are running multiple instances you end up with several folders in the wsconfig folder - 1 for each instance (FYI - the root of a multi-instance CF installation is JRUN4, not ColdfusionMX7 as you might think). You might suspect that each site needing flash remoting should point this virtual to "it's own" instance. This is not the case. As Russ (a.k.a. "Snake") pointed out in a recent cfguru post, you must point this virtual to folder number 1. So...

C:\JRun4\lib\wsconfig\2
...would not work, but...
C:\JRun4\lib\wsconfig\1
...does work. I'm betting there is some other setting in a config file somewhere that needs to be adjusted to bring the instances into alignment with flash remoting.

  • Share:

Coldfusion Administrator and the jvm.config file (a love-hate relationship)

Mark Kruger October 28, 2005 7:34 PM Coldfusion Optimization, Coldfusion MX 7 Comments (8)

If you are using CMFX and trying to "tune" the JVM - or maybe even just adding a class path, I have some advice for you. Don't use the CF Administrator to do it! Instead, get used to editing the jvm.config file located in cfusionmx7/runtime/bin. Not only will you benefit from gaining a better knowledge of the inner workings of your JVM, but you will also miss out on a ticklish bug that will have you scratching your head in frustration. Here's the scoop.

Read More
  • Share:

IsDefined() Vs. StructKeyExists() - The Nuances of CFMX Structures

Mark Kruger September 8, 2005 6:26 PM Coldfusion MX 7, Coldfusion Tips and Techniques Comments (7)

There's a very interesting post and discussion on Brian Kotek's blog today dealing with the use of the function "isDefined( )" vs "structKeyExists( )". If you've been programming since the days of CF 4.x and "parameterexists()" you'll know that using isDefined() can be a delicate experience at times. It becomes especially tricky in CFMX where the way variables are initiated has changed. In the old days you could have a variable in the variables scope that included a period in the name, and unless you specifically called "structNew()" it would stand as primitive variable in the variables scope. Take this Example:

Read More
  • Share:

Application Name Gotcha - Case Sensitivity

Mark Kruger September 7, 2005 9:39 PM Coldfusion MX 7 Comments (8)

You may have read one of my previous posts regarding the nuances of working with Application Variables. In the first post I took great pains to point out that the application name is the anchor for all the variables in the application and that naming 2 separate applications the same results in them sharing the same scope. Now, thanks to Jim Davis of Depressed Press I have another "gotcha" to add to the conversation.

Read More
  • Share: