Railo Performance Test
Why not?
Mark Drew started a small test comparing the different engines in terms of performance. Since some of the engines did not finish as good as expected, the comments on the blog entry reflected that atomar tests are not so significant and a real field test should be done.
This was something that Vince Bonfanti proposed and done this week. The results can be read in Vince's blog. A couple of people wanted Railo to be compared to the other engines as well. So I used the same code Vince used in order to test the performance of Railo in comparison to the other engines.
As I mentioned in a comment on the blog, I was surprised how good Bluedragon 7 competes with components since BD7 is still an interpreter. Nevertheless I added some other tests just to show the differences.
The machine I used was nothing special. It's my development laptop, a Sony Vailo VGN A417M with 1.5GB of RAM and every engine using 512MB of JVM size. Each test was recorded in the same way using Microsofts Stress Testing Tool with 3 simultaneous requests.
Since BD7 Beta II did so good with components, I added some tests with Structs. The first one just fills a large struct and the second one only creates many small structs.
With this second test you can see one of the main weaknesses of CFMX. Large structs should be avoided as often as possible. Railo and even BD are much faster the larger the structs grow.
Test 1 was the exact same Vince used:
<cfparam name="url.x" default="50">
<cfset x=url.x>
<cfloop from="1" to="#x#" index="i"><!---
---><cfset oItem = CreateObject('component', 'Person')><!---
---><cfset oItem.setname("Bob" & i )><!---
---><cfset oItem.setage(20)><!---
---></cfloop>
done!
And the component code:
<cfcomponent>
<cfset this.name = "">
<cfset this.age = 0>
<cffunction name="setName">
<cfargument name="name">
<cfset this.name = arguments.name>
</cffunction>
<cffunction name="setAge">
<cfargument name="age">
<cfset this.age = arguments.age>
</cffunction>
</cfcomponent>
Since I knew how good BD7 acts with components I tried the same with structs:
<cfparam name="url.x" default="50">
<cfset x=url.x>
<cfset stItem = StructNew()>
<cfloop from="1" to="#x#" index="i"><!---
---><cfset stItem[i].Bob= i><!---
---><cfset stItem[i].age = 20><!---
---></cfloop>
done!

Now, since I know that CFMX does handles large strucs badly I added this test:
<cfparam name="url.x" default="50">
<cfset x=url.x>
<cfloop from="1" to="#x#" index="i"><!---
---><cfset stItem = StructNew()><!---
---><cfset stItem.Bob= i><!---
---><cfset stItem.age = 20><!---
---></cfloop>
done!
But I must also say, that everyone should do the tests for himself in order to find out, if the designated CFML engine suits him.



There are no comments for this entry.
[Add Comment]