473,664 Members | 3,022 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB.NET vs CFMX tick count distribution?

I have compared, in ms, the time VB.NET and CFMX take to execute code that
is nearly exact in their respective languages. The tick count distributions
in VB.NET are very tight, ranging from 154 - 190 with no outliers. The CFMX
code is distributed in the range 356 - 950 and one outlier at 1356. Why is
the VB.NET code distributed very tightly against the mean vs. the CFMX code?

Thanks,
Brett
Nov 21 '05 #1
13 1460

You'll have to be more specific--post the code (both vb.net and cfml).

Sam
On Fri, 31 Dec 2004 06:25:52 -0500, "Brett" <no@spam.net> wrote:
I have compared, in ms, the time VB.NET and CFMX take to execute code that
is nearly exact in their respective languages. The tick count distributions
in VB.NET are very tight, ranging from 154 - 190 with no outliers. The CFMX
code is distributed in the range 356 - 950 and one outlier at 1356. Why is
the VB.NET code distributed very tightly against the mean vs. the CFMX code?

Thanks,
Brett


Nov 21 '05 #2
ok, the code follows. Both languags are connecting to a mail server,
downloading messages and then displaying each by looping.

-- CFMX --

<cfscript>
ipworksPOPobj = structnew();
ipworksPOPobj = CreateObject("c om", "IPWorksASP5.PO P");
ipworksPOPobj.M ailServer = "mail.abc.c om";
ipworksPOPobj.u ser = "te**@abc.c om";
ipworksPOPobj.p assword = "test";
ipworksPOPobj.c onnect();
</cfscript>

<cfloop from="1" to="#ipworksPOP obj.MessageCoun t#" index="iMesgNo" >
<cfoutput>
<cfset ipworksPOPobj.M essageNumber = iMesgNo>
<cfset ipworksPOPobj.R etrieve()>
Subject: #ipworksPOPobj. MessageSubject# <br>
To: #ipworksPOPobj. MessageTo#<br>
Date: #ipworksPOPobj. MessageDate#<br >
From: #ipworksPOPobj. MessageFrom#<br >
#ipworksPOPobj. MessageHeaders# <br><br>
#htmleditformat (ipworksPOPobj. MessageText)#<b r><br>-------------<br><br>
</cfoutput>
</cfloop>
<cfset ipworksPOPobj.D isconnect()>

-- VB.NET --

Dim starttime As Integer
Label1.Text = ""
starttime = Environment.Tic kCount
Dim mail As New Pop3Mail
ProgressBar1.Pe rformStep()
mail.Connect("m ail.abc.com", "te**@abc.c om", "test")
ProgressBar1.Pe rformStep()
For Each msg As Pop3Mail.Pop3Me ssage In mail.List
ProgressBar1.Pe rformStep()

Label1.Text = TextBox1.Text & DirectCast(mail .Retrieve(msg),
Pop3Mail.Pop3Me ssage).message
Next
Label1.Text = (Environment.Ti ckCount - starttime) & "- -" & Label1.Text
starttime = 0
The VB.NET POP3Mail methods are those provided by Ken Tucker (see thread
'Downloading mail through VB.NET' @ 11:46A on 12/30/04)

Hope that helps.

Thanks,
Brett

"Samuel R. Neff" <bl****@newsgro up.nospam> wrote in message
news:6i******** *************** *********@4ax.c om...

You'll have to be more specific--post the code (both vb.net and cfml).

Sam
On Fri, 31 Dec 2004 06:25:52 -0500, "Brett" <no@spam.net> wrote:
I have compared, in ms, the time VB.NET and CFMX take to execute code that
is nearly exact in their respective languages. The tick count
distributio ns
in VB.NET are very tight, ranging from 154 - 190 with no outliers. The
CFMX
code is distributed in the range 356 - 950 and one outlier at 1356. Why
is
the VB.NET code distributed very tightly against the mean vs. the CFMX
code?

Thanks,
Brett

Nov 21 '05 #3

The problem is probably related to the fact that you're using a COM
object in CFMX when you don't need to. If you were to marshall the
vb.net call through a pure java jar file (not a J# compiled java file,
but real java bytecode) then you'd most likely see the same slower
speed and variability.

Try using <cfpop> instead or at least the built-in javamail options
instead of a COM object. That will improve the CFMX performance and
reduce the variability.

HTH,

Sam

On Fri, 31 Dec 2004 10:55:22 -0500, "Brett" <no@spam.com> wrote:
ok, the code follows. Both languags are connecting to a mail server,
downloading messages and then displaying each by looping.

-- CFMX --

<cfscript>
ipworksPOPobj = structnew();
ipworksPOPobj = CreateObject("c om", "IPWorksASP5.PO P");
ipworksPOPobj.M ailServer = "mail.abc.c om";
ipworksPOPobj.u ser = "te**@abc.c om";
ipworksPOPobj.p assword = "test";
ipworksPOPobj.c onnect();
</cfscript>

<cfloop from="1" to="#ipworksPOP obj.MessageCoun t#" index="iMesgNo" >
<cfoutput>
<cfset ipworksPOPobj.M essageNumber = iMesgNo>
<cfset ipworksPOPobj.R etrieve()>
Subject: #ipworksPOPobj. MessageSubject# <br>
To: #ipworksPOPobj. MessageTo#<br>
Date: #ipworksPOPobj. MessageDate#<br >
From: #ipworksPOPobj. MessageFrom#<br >
#ipworksPOPobj. MessageHeaders# <br><br>
#htmleditformat (ipworksPOPobj. MessageText)#<b r><br>-------------<br><br>
</cfoutput>
</cfloop>
<cfset ipworksPOPobj.D isconnect()>

-- VB.NET --

Dim starttime As Integer
Label1.Text = ""
starttime = Environment.Tic kCount
Dim mail As New Pop3Mail
ProgressBar1.P erformStep()
mail.Connect(" mail.abc.com", "te**@abc.c om", "test")
ProgressBar1.P erformStep()
For Each msg As Pop3Mail.Pop3Me ssage In mail.List
ProgressBar1.P erformStep()

Label1.Text = TextBox1.Text & DirectCast(mail .Retrieve(msg),
Pop3Mail.Pop3M essage).message
Next
Label1.Text = (Environment.Ti ckCount - starttime) & "- -" & Label1.Text
starttime = 0
The VB.NET POP3Mail methods are those provided by Ken Tucker (see thread
'Downloading mail through VB.NET' @ 11:46A on 12/30/04)

Hope that helps.

Thanks,
Brett

Nov 21 '05 #4
Thank you. What is causing the variability? How do I investigate this?

You are saying if I use cfpop, then the CFMX would be about as fast as
VB.NET? I always thought VB.NET would be much faster than a scripting
language for comparable code. Can you comment on this?

From what I gather, if I use IPWorks VB version in VB.NET, this would slow
down overall performance in VB.NET? I thought it would enhance performance
since IPWorks specializes in this area. Please comment.

Kind regards,
Brett Romero

"Samuel R. Neff" <bl****@newsgro up.nospam> wrote in message
news:9s******** *************** *********@4ax.c om...

The problem is probably related to the fact that you're using a COM
object in CFMX when you don't need to. If you were to marshall the
vb.net call through a pure java jar file (not a J# compiled java file,
but real java bytecode) then you'd most likely see the same slower
speed and variability.

Try using <cfpop> instead or at least the built-in javamail options
instead of a COM object. That will improve the CFMX performance and
reduce the variability.

HTH,

Sam

On Fri, 31 Dec 2004 10:55:22 -0500, "Brett" <no@spam.com> wrote:
ok, the code follows. Both languags are connecting to a mail server,
downloading messages and then displaying each by looping.

-- CFMX --

<cfscript>
ipworksPOPobj = structnew();
ipworksPOPobj = CreateObject("c om", "IPWorksASP5.PO P");
ipworksPOPobj.M ailServer = "mail.abc.c om";
ipworksPOPobj.u ser = "te**@abc.c om";
ipworksPOPobj.p assword = "test";
ipworksPOPobj.c onnect();
</cfscript>

<cfloop from="1" to="#ipworksPOP obj.MessageCoun t#" index="iMesgNo" >
<cfoutput>
<cfset ipworksPOPobj.M essageNumber = iMesgNo>
<cfset ipworksPOPobj.R etrieve()>
Subject: #ipworksPOPobj. MessageSubject# <br>
To: #ipworksPOPobj. MessageTo#<br>
Date: #ipworksPOPobj. MessageDate#<br >
From: #ipworksPOPobj. MessageFrom#<br >
#ipworksPOPobj. MessageHeaders# <br><br>
#htmleditformat (ipworksPOPobj. MessageText)#<b r><br>-------------<br><br>
</cfoutput>
</cfloop>
<cfset ipworksPOPobj.D isconnect()>

-- VB.NET --

Dim starttime As Integer
Label1.Text = ""
starttime = Environment.Tic kCount
Dim mail As New Pop3Mail
ProgressBar1. PerformStep()
mail.Connect( "mail.abc.c om", "te**@abc.c om", "test")
ProgressBar1. PerformStep()
For Each msg As Pop3Mail.Pop3Me ssage In mail.List
ProgressBar1. PerformStep()

Label1.Text = TextBox1.Text & DirectCast(mail .Retrieve(msg),
Pop3Mail.Pop3 Message).messag e
Next
Label1.Text = (Environment.Ti ckCount - starttime) & "- -" & Label1.Text
starttime = 0
The VB.NET POP3Mail methods are those provided by Ken Tucker (see thread
'Downloadin g mail through VB.NET' @ 11:46A on 12/30/04)

Hope that helps.

Thanks,
Brett

Nov 21 '05 #5
Both CFML and VB.NET are compiled languages that compile down to
intermediate code--CFML to java bytecode and VB.NET to msil. There
will be some performance differences but nothing like comparing a
scripting language to a compiled language. CF5 and earlier were
scripted languages, but that's no longer the case. CFMX gets directly
compiled to Java bytecode.

There are a lot of factors that can cause the variability. Whenever
you use non-native technologies you're going to see some incrased
variability and decreased performance--like COM from Java (CFMX) and
Java from .NET. Probably even to a certain degree COM from .NET.

Using a COM oject from .NET will most likely slow down performance vs.
a native object--it really depends on how much processing is done by
the object and whether the decreased performance of the method call
can be overcome by increased performance of the method itself (if
there really is increased performance in the COM object). But there's
also the additional factor that not all "native" classes in .NET are
really native to .NET, many of them are wrappers around existing Win32
and COM objects. So you may be using a COM object in .NET and not
even know it. However, the advantage of using a .NET object is that
going forward you'll most likely see some of them transition to native
code that previously used other objects with an associated increase in
performance.

HTH,

Sam


On Fri, 31 Dec 2004 22:28:58 -0500, "Brett" <no@spam.net> wrote:
Thank you. What is causing the variability? How do I investigate this?

You are saying if I use cfpop, then the CFMX would be about as fast as
VB.NET? I always thought VB.NET would be much faster than a scripting
language for comparable code. Can you comment on this?

From what I gather, if I use IPWorks VB version in VB.NET, this would slow
down overall performance in VB.NET? I thought it would enhance performance
since IPWorks specializes in this area. Please comment.

Kind regards,
Brett Romero

Nov 21 '05 #6
>Whenever you use non-native technologies you're going to see some incrased
variability and decreased performance
I can understand decreased performance in the above scenario but why
variability? Say I have a COM object fully written in VB.NET. I make the
call from VB.NET to the object, are you saying there will be no variability?
Why?

Thanks. The code I posted downloads messages, loops through each message
and inserts it into an SQL Server via stored procedures. VB.NET can
establish a native ODBC interface through the .sqlclient driver but CF must
use OLEDB or the generic SQL driver. In the case, should VB.NET always have
the performance advantage for the same code?

CF will never be as optimized to run on a Windows server and interface with
SQL Server as VB.NET will. For this one reason, CF will lag in performance
compared to VB.NET. I will try the CFMX code with cfpop post my results.

Brett

"Samuel R. Neff" <bl****@newsgro up.nospam> wrote in message
news:6h******** *************** *********@4ax.c om... Both CFML and VB.NET are compiled languages that compile down to
intermediate code--CFML to java bytecode and VB.NET to msil. There
will be some performance differences but nothing like comparing a
scripting language to a compiled language. CF5 and earlier were
scripted languages, but that's no longer the case. CFMX gets directly
compiled to Java bytecode.

There are a lot of factors that can cause the variability. Whenever
you use non-native technologies you're going to see some incrased
variability and decreased performance--like COM from Java (CFMX) and
Java from .NET. Probably even to a certain degree COM from .NET.

Using a COM oject from .NET will most likely slow down performance vs.
a native object--it really depends on how much processing is done by
the object and whether the decreased performance of the method call
can be overcome by increased performance of the method itself (if
there really is increased performance in the COM object). But there's
also the additional factor that not all "native" classes in .NET are
really native to .NET, many of them are wrappers around existing Win32
and COM objects. So you may be using a COM object in .NET and not
even know it. However, the advantage of using a .NET object is that
going forward you'll most likely see some of them transition to native
code that previously used other objects with an associated increase in
performance.

HTH,

Sam


On Fri, 31 Dec 2004 22:28:58 -0500, "Brett" <no@spam.net> wrote:
Thank you. What is causing the variability? How do I investigate this?

You are saying if I use cfpop, then the CFMX would be about as fast as
VB.NET? I always thought VB.NET would be much faster than a scripting
language for comparable code. Can you comment on this?

From what I gather, if I use IPWorks VB version in VB.NET, this would slow
down overall performance in VB.NET? I thought it would enhance
performance
since IPWorks specializes in this area. Please comment.

Kind regards,
Brett Romero

Nov 21 '05 #7

CFMX doesn't support OLEDB, it supports JDBC and ODBC via the JDBC
bridge. However, it also supports MSSQL via a native JDBC driver
(pure Java, no intermediary code).

Similarly, .NET supports MSSQL through a native driver without using
either ODBC or OLEDB. You should use the native mssql driver and not
odbc with .NET.

HTH,

Sam
On Sat, 1 Jan 2005 11:28:32 -0500, "Brett" <no@spam.net> wrote:
Whenever you use non-native technologies you're going to see some incrased
variability and decreased performance


I can understand decreased performance in the above scenario but why
variability? Say I have a COM object fully written in VB.NET. I make the
call from VB.NET to the object, are you saying there will be no variability?
Why?

Thanks. The code I posted downloads messages, loops through each message
and inserts it into an SQL Server via stored procedures. VB.NET can
establish a native ODBC interface through the .sqlclient driver but CF must
use OLEDB or the generic SQL driver. In the case, should VB.NET always have
the performance advantage for the same code?

CF will never be as optimized to run on a Windows server and interface with
SQL Server as VB.NET will. For this one reason, CF will lag in performance
compared to VB.NET. I will try the CFMX code with cfpop post my results.

Brett

Nov 21 '05 #8

While it certainly may be true that a certain operation will run
better in one technology as opposed to another, it will always be true
that a improperly implemented technology wil perform worse than a
proper implementation. Use the right options for the language and
platform you're targeting.

Sam
On Sat, 1 Jan 2005 11:28:32 -0500, "Brett" <no@spam.net> wrote:
CF will never be as optimized to run on a Windows server and interface with
SQL Server as VB.NET will. For this one reason, CF will lag in performance
compared to VB.NET. I will try the CFMX code with cfpop post my results.

Brett


Nov 21 '05 #9

"Samuel R. Neff" <bl****@newsgro up.nospam> wrote in message
news:kd******** *************** *********@4ax.c om...

CFMX doesn't support OLEDB, it supports JDBC and ODBC via the JDBC
bridge. However, it also supports MSSQL via a native JDBC driver
(pure Java, no intermediary code).
Isn't this still slower than the .sqlclient driver VB.NET will use, which is
optimized to work with the OS and target database, since all were designed
by the same people? CFMX isn't optimized to this point.

Similarly, .NET supports MSSQL through a native driver without using
either ODBC or OLEDB. You should use the native mssql driver and not
odbc with .NET.

HTH,

Sam
On Sat, 1 Jan 2005 11:28:32 -0500, "Brett" <no@spam.net> wrote:
Whenever you use non-native technologies you're going to see some
incrased
variability and decreased performance


I can understand decreased performance in the above scenario but why
variability ? Say I have a COM object fully written in VB.NET. I make the
call from VB.NET to the object, are you saying there will be no
variability ?
Why?

Thanks. The code I posted downloads messages, loops through each message
and inserts it into an SQL Server via stored procedures. VB.NET can
establish a native ODBC interface through the .sqlclient driver but CF
must
use OLEDB or the generic SQL driver. In the case, should VB.NET always
have
the performance advantage for the same code?

CF will never be as optimized to run on a Windows server and interface
with
SQL Server as VB.NET will. For this one reason, CF will lag in
performance
compared to VB.NET. I will try the CFMX code with cfpop post my results.

Brett

Nov 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
8396
by: Carl | last post by:
I have a main form with navigation buttons on it and a label showing for example Record 1 of 15 using recordsetclone on it and eveything works fine. When I move through the records the record number changes fine. Within this main form I have a subform detailing distribution records for the contact (main form is based on this) that also has navigation buttons and a label showing Distribution 1 of ##. This is where the problem lies. The...
9
10835
by: Terry E Dow | last post by:
Howdy, I am having trouble with the objectCategory=group member.Count attribute. I get one of three counts, a number between 1-999, no member (does not contain member property), or 0. Using LDIFDE as a comparison I get the same results. No members means just that, an empty group. Zero means that the DirectorySearcher.SizeLimit has been exceeded....
0
962
by: Brett | last post by:
I have a server running two VB.NET apps, CFMX and SQL Server. The same app uses all three products. I need to create a web based admin area for this app, which only us admins (no users) will see. It would be nice if we could see if the two VB.NET apps were running and possibly restart or kill them throug the webpage. Getting info if SQL Server and CFMX are running would also be nice. Possibly other system related info but not sure...
10
4405
by: Henk Ernst Blok | last post by:
Hi Posgres users/developers, Can anyone explain why PosgreSQL (version 7.4.5 on Linux) does a full table scan to compute a count(*) on a base table after a vacuum analyze has been done with no following updates that might have outdated any statistics. Strangly the explain command does give the correct number of tuples instantaniously from the catalog, as one would expect. Still the optimizer thinks it needs a full table scan to do count....
0
1031
by: Daniel | last post by:
Can someone help me find an example that queries a db and return data to the caller. Below is what I'v been able to put together from this list buy my CFMX is returning an error. WebMethod(MessageName:="Hello"), _ SoapDocumentMethod( _ RequestElementName:="CheckOrderParameter", _ ResponseElementName:="CheckOrderResponse")> _ Public Function HelloWorld() As XmlDataDocument
4
1219
by: Daniel | last post by:
I've been asking around and reading but I cannot find a definitive answer. I have customers that need information from our calendar application. The data will come from SQL Server 2000. The customers who use .net are able to read the datasets that the web service returns. I'm having problems when customers are using Java or CFMX. What is the proper way to "return" data from the webservice. This data will consist of multiple rows...
5
1598
by: John | last post by:
Hi I have a bound gridview. I need to allow users to select multiple rows and then press the process button to process multiple selected rows. For this I want to use additional column of checkboxes (unbound?) which user can tick. Is there an example of such a scenario somewhere that I can have a look at? Thanks
5
10841
by: not_a_commie | last post by:
So I have a motherboard with multiple CPU sockets. It seems that if I create a StopWatch on one thread and then call the Elapsed member from a different thread that sometimes I get a tick count that's a million miles away. My thinking is that I can subclass the StopWatch. Then when the Elapsed member is called, I can invoke it on the thread that the StopWatch class was created on. True? How? Or is there an easy way that I could scan...
3
23409
by: shanakard | last post by:
i am writing a program for string matching (for a assignment @ our campus) i want to measure the cpu tick count(or verry accurate time measurement, maybe in icro seconds or so...) to analyze running time. can i do this in java and f so how?
0
8437
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8861
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8549
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7375
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6187
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5660
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4351
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2003
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1759
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.