Raymond,
        That's quite a difference.  Is there a performance aadvantage to
using CFFUNCTION as opposed to the CF5 style function?  If so, are you
planning to have CF5 and CFMX versions of the same functions at cflib.org?

        Eric 

-----Original Message-----
From: Raymond Camden [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 29, 2002 1:41 PM
To: CF-Talk
Subject: RE: CFMX performance (was RE: CF MX)


Oh yea, regex is VERY nice in MX. Here is a comparison of two ways to do
a capfirst type function:

CF5:
function CapFirst(str) {
        var newstr = "";
        var word = "";
        var i = 1;
        var strlen = listlen(str," ");
        for(i=1;i lte strlen;i=i+1) {
                word = ListGetAt(str,i," ");
                newstr = newstr & UCase(Left(word,1));
                if(len(word) gt 1) newstr = newstr &
Right(word,Len(word)-1);
                if(i lt strlen) newstr = newstr & " ";
        }
        return newstr;
}

CFMX:

<cffunction name="capFirst">
        <cfargument name="str" required=true>
        
        <cfreturn
reReplace(str,"([[:space:]]*?)([^[:space:]]*)","\1\u\2","all")>

</cffunction>

=======================================================================
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

Email    : [EMAIL PROTECTED]
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: Michael Dinowitz [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, April 29, 2002 12:30 PM
> To: CF-Talk
> Subject: RE: CFMX performance (was RE: CF MX)
> 
> 
> enhanced RegEx, CFCs, and error handling in CFSCRIPT are my 3 
> favorites. :)
> 
> At 12:26 PM 4/29/02, you wrote:
> ><with no sarcasm> Which features are so essential that I need to
> >upgrade?
> >
> >- Matt Small
> >
> >-----Original Message-----
> >From: Matt Liotta [mailto:[EMAIL PROTECTED]] 
> >Sent: Monday, April 29, 2002 11:45 AM
> >To: CF-Talk
> >Subject: RE: CFMX performance (was RE: CF MX)
> >
> >No performance advantage really. You should upgrade for the 
> new features
> >though.
> >
> >-Matt
> >
> >> -----Original Message-----
> >> From: Matthew R. Small [mailto:[EMAIL PROTECTED]]
> >> Sent: Monday, April 29, 2002 8:30 AM
> >> To: CF-Talk
> >> Subject: RE: CFMX performance (was RE: CF MX)
> >> 
> >> So, in a small company like mine, where I have maybe 5 
> people using CF
> >> at once on an intranet application, (I also use CF from a 
> shared host)
> >> there is no advantage to going to MX? I'm still waiting for a great
> >> reason to upgrade to CF 5.0.
> >> 
> >> - Matt Small
> >> 
> >> -----Original Message-----
> >> From: Matt Liotta [mailto:[EMAIL PROTECTED]]
> >> Sent: Monday, April 29, 2002 11:11 AM
> >> To: CF-Talk
> >> Subject: CFMX performance (was RE: CF MX)
> >> 
> >> Yup, you're right. Well in that case on with the ensuing flame war.
> >> 
> >> First the caveats; CFMX has not been tuned for performance yet
> >according
> >> to MM.
> >> 
> >> With that aside, I have been working with Neo since the 
> alpha days and
> >> have seen it change quite a bit since then. During that time I have
> >> learned that CFMX will have a performance threshold very 
> close to that
> >> of JSP. For those of you who don't know, JSP doesn't 
> actually perform
> >> that well. On a single server, a properly built CF 5 
> application would
> >> blow away a properly built JSP application. This is a fact 
> that can be
> >> easily proved today. However, JSP is more scalable than CF 
> 5. This is
> >an
> >> important distinction depending on what type of load your 
> application
> >is
> >> planning on supporting. If you are a shared hosting 
> provider, you will
> >> be able to support less web applications on the same 
> server than with
> >CF
> >> 5. If you maintain a small site that only uses a single server, you
> >will
> >> need more server resources to provide the same level of performance
> >you
> >> are used today with CF 5.
> >> 
> >> With all that being said, if you currently run a web 
> application that
> >> depends on more than one CF server, CFMX is going to be 
> great. Using
> >> J2EE, you will be able to partition your application on 
> top different
> >> servers to increase its scalability. With a properly built CFMX
> >> application you will be able to simply add more servers as needed.
> >> 
> >> -Matt
> >> 
> >> > -----Original Message-----
> >> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> >> > Sent: Monday, April 29, 2002 7:44 AM
> >> > To: CF-Talk
> >> > Subject: RE: CF MX
> >> >
> >> > Jump over to the Neo forums on the beta site - Libby English of
> >> > Macromedia : "You can now discuss all aspects of the new CF
> >> release..."
> >> >
> >> > ---
> >> > Billy Cravens
> >> >
> >> >
> >> > -----Original Message-----
> >> > From: Matt Liotta [mailto:[EMAIL PROTECTED]]
> >> > Sent: Monday, April 29, 2002 9:39 AM
> >> > To: CF-Talk
> >> > Subject: RE: CF MX
> >> >
> >> > That information is NDA at this point.
> >> >
> >> > -Matt
> >> >
> >> > > -----Original Message-----
> >> > > From: Bill Wheatley [mailto:[EMAIL PROTECTED]]
> >> > > Sent: Monday, April 29, 2002 7:28 AM
> >> > > To: CF-Talk
> >> > > Subject: CF MX
> >> > >
> >> > > Now that i'm at a new job i need tow ork my bosses over to get
> >them
> >> to
> >> > > upgrade from CF 4 (ugh) to cF MX. i need to find a 
> page that shows
> >> the
> >> > > performance stats compared to older versions any ideas?
> >> > >
> >> > >
> >> > > Bill Wheatley
> >> > > Senior Database Developer
> >> > > Ediets.com
> >> > > Macromedia Certified Coldfusion Developer
> >> > > 954.360.9022 X159
> >> > >
> >> >
> >> >
> >> 
> >> 
> >
> >
> 

______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to