![]() |
| Coding Tip: Converting CFML tags to CFScript |
|
JeanR
HostMySite Marketing
|
Converting CFML tags to CFScript
In recent months we've worked with many of our current clients to help speed up queries, which benefits both our servers and their development servers. An excellent article came to our attention recently regarding some tried and true changes that can be used in CFMX 7, which you can read here: http://www.nomachetejuggling.com/2006/12/07/coldfusions-compiler/ This discusses the benefits of integrating the CFScript tag into your code, which allows you to write direct ColdFusion scripting language inside of one tag. Read more about CFScript by visiting http://livedocs.macromedia.com. |
||||||||||||
|
|
|||||||||||||
|
pmeserve
HostMySite Tech
|
Just for kicks I tried this out in Ruby and PHP:
ruby: 6.39 seconds php: 0.16 seconds But gee, the ruby code is so much nicer:
Guess I'll just wait for YARV. Thankfully I don't have to sum up numbers 1 million times in code very often |
||||||||||||||
|
|
|||||||||||||||
| Good to know |
|
comprug
Forum Regular
|
Paul, good to know you too are eyeing YARV.
|
||||||||||||
|
|
|||||||||||||
|
pmeserve
HostMySite Tech
|
Yeah - in general I think its true that Ruby's slowness isn't a big deal for normal web applications, but we've definitely had times with internal apps where I wished for more speed. In addition to YARV I'm hopeful about Rubinius and to some extent JRuby too
It's great that the increasing adoption of Rails has spurred a lot of interest in overhauling Ruby's rusty internals |
||||||||||||
|
|
|||||||||||||
| Ruby Books |
|
comprug
Forum Regular
|
In Ruby books mentioning slowness (such as Hal Fulton's the Ruby Way, in my opinion the best, most intuitive Ruby book out there) the possibility of an uninterpreted Ruby was mentioned (i.e like C++ in that it is native) Is that YARV, or is YARV just optimized? Also, as 37signals mentioned in their blog, you can cheat to make up for the difference in speed.
Completely random, but for the sake of compactness in one post, I heard about your company's little episode in Dave & Busters from servicedefined.com. Your CEO mentioned 180 employees which means that you have 200 or more, beacuse some have to staff the call center. Amazing how mcuh HMS has grown. |
||||||||||||||||
|
|
|||||||||||||||||
|
pmeserve
HostMySite Tech
|
I know exactly the post you're talking about. It was on DHH's blog here - he makes a good point. We actually use PHP scripts on the back-end for certain functions in Rails apps, although primarily because we had pre-existing scripts, and there didn't seem to be any reason to recode them when the rest of the app moved to Rails
I believe the plan with YARV is to compile the code, and support compiling at runtime or beforehand(JIT vs. AOT) re: D&B, Lou said 180 *people* were there. That's employees + guests. We're actually around 160 total employees though, so still pretty high. I was one of the ones manning the fort that night |
||||||||||||
|
|
|||||||||||||
| Like CF |
|
comprug
Forum Regular
|
|
||||||||||||||
|
|
|||||||||||||||
| Interesting |
|
comprug
Forum Regular
|
Paul,
I found this interesting blog post on nubyonrails.com: [quote]PeepCode Screencasts Places a $1,000 Bet on Rubinius
|
|||||||||||||
|
|
||||||||||||||
| Yep, I know this is 90% RoR |
|
comprug
Forum Regular
|
Well I guess this topic is 90% RoR, but it doesn't make sense to move it for location purposes...
|
||||||||||||
|
|
|||||||||||||
| Re: Yep, I know this is 90% RoR |
|
Jason101
Forum Regular
|
Not sure how this drifted from CFScript to RoR |
||||||||||||||
|
|
|||||||||||||||
| Coding Tip: Converting CFML tags to CFScript |
|
||
|


