473,776 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Speed : The PIA impact (VB 6.0 vs VB.NET)

Hello,

I have made a migration from VB 6.0 to VB.NET and noticed a great speed
change when I access (from VB) to Excel Cells (same problem to write Visio
formulas from VB).
The same code takes 21 seconds in VB 6.0 and 54 seconds in VB.NET (see below)

1. Is that fact well known?
2. How to solve the problem?
3. Can we hope amelioration in latter version?

---------------------------------------------------------

In VB 6.0 the following code is executed in 21 seconds in VB 6.0 and 54
seconds in VB.NET on the same PC:
Dim I As Integer
Dim J As Integer
Dim myExcelApp As Excel.Applicati on
Dim objBook As Excel.Workbook
Dim objSheet As Excel.Worksheet
Dim dStart As Double

Set myExcelApp = CreateObject("E xcel.Applicatio n")
Set objBook = myExcelApp.Work books.Add("D:\t oto.xls")
Set objSheet = objBook.Workshe ets("Sheet1")

dStart = Timer

For I = 1 To 60
For J = 1 To 100
objSheet.Cells( J, I).Value = 1
Next J
Next I
MsgBox ("This operation took : " & CStr(CInt(Timer - dStart)) & "
seconds")

--------------------------------------------------------------------------------------

Thank you

Philippe

PS : To make yourself the experience on VB.NET, just replace in this VB 6.0
code "Timer" by "Microsoft.Visu alBasic.Timer"
Jul 21 '05 #1
3 1360
Philippe TEIRUH <Ph************ @discussions.mi crosoft.com> wrote:
I have made a migration from VB 6.0 to VB.NET and noticed a great speed
change when I access (from VB) to Excel Cells (same problem to write Visio
formulas from VB).
The same code takes 21 seconds in VB 6.0 and 54 seconds in VB.NET (see below)

1. Is that fact well known?
2. How to solve the problem?
3. Can we hope amelioration in latter version?

---------------------------------------------------------

In VB 6.0 the following code is executed in 21 seconds in VB 6.0 and 54
seconds in VB.NET on the same PC:


Is this using Option Strict On or not? I believe interop is much slower
using Option Strict Off than On.

You will probably find that others in the VB.NET group
(microsoft.publ ic.dotnet.langu ages.vb) or in the interop group
(microsoft.publ ic.dotnet.frame work.interop) can give you more
information on that.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #2
Philippe,

Did you try that in a loop or only one time, dotNet programs can be slower
the first time that the code is used. Which is a general fact for all dotNet
programs what has to do with the JIT compiling.

When that is not the problem there is for VB6 upgrade is a special newsgroup

Microsoft.publi c.dotnet.langua ges.vb.upgrade

I hope this helps?

Cor
Jul 21 '05 #3
Thank you for the ideas

I will try on
microsoft.publi c.dotnet.framew ork.interop
Microsoft.publi c.dotnet.langua ges.vb.upgrade
microsoft.publi c.dotnet.langua ges.vb

Philippe

"Cor Ligthert" wrote:
Philippe,

Did you try that in a loop or only one time, dotNet programs can be slower
the first time that the code is used. Which is a general fact for all dotNet
programs what has to do with the JIT compiling.

When that is not the problem there is for VB6 upgrade is a special newsgroup

Microsoft.publi c.dotnet.langua ges.vb.upgrade

I hope this helps?

Cor

Jul 21 '05 #4

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

Similar topics

2
2420
by: migue | last post by:
way below newbie level: I know nothing about .Net. Have a VB6 client-server application (business app, inventory, purchasing, invoicing, etc.) and am considering converting it to VB.Net at a customer's request. The goal is to have access to the application from remote locations without the need to install anything on the client. Question 1: How will the user's desktop experience change using .Net vs. VB? i.e. will
8
1934
by: noid droid | last post by:
Hi. I posted yesterday asking if C# lived up to the hype. Thus far the feedback has been all positive. (Thanks.) Can anyone suggest GOOD books for learning C# and the Visual Studio .NET IDE? If there is a book that covers both, that would be great. Also, is it necessary for me to learn a lot about the .NET framework that wouldn't also be covered in one of the books? If I can find a book that'll get me up and running with the IDE...
3
1676
by: main\(\){}; | last post by:
I can't ignore the speed of .NET managed applications in manipulating string, I/O and arithmetic operations. However, we can never compare the speed of a C/C++ program with its .NET counterpart when it comes to some heavy operations, like long loops, graphics, load time and many other issues. The dream is; having an intermediate language (IL) run in the virtual machine at the speed of an unmanaged code. Java has in many ways solved this...
2
2055
by: chrisben | last post by:
Hi All Has anyone done any experiment on comparison between C++ and C# on socket rec/send speed Conditions in Windows system, same CPU for senders or receivers. Can you see how much faster a C++ app can send/rec messages than a C# app I am working on some real time apps with heave traffic. I am not sure whether .NET can handle it at all Thanks a lo Chri
1
253
by: Grumpy Aero Guy | last post by:
The college I teach VB for just upgraded to .net from VB6 (without ANY warning to the professors--- at least we know where we stand) Therefore, I'm kinda scrambling to get a few rough edges ironed out. VB6 allowed for the creation of an ActiveX DLL project. I have been able to scrounge a VB.Net standard version for now to get up to speed.
25
1946
by: Siv | last post by:
Hi, As part of an evaluation of a small utility that I wrote that converts some data held in a large number of Excel spreadsheets into SQL Server, I decided to convert the utility to VB .NET and run both versions both in the IDE and as standalone compiled exe and see what the difference in time to complete was. The utility has to read 3842 single page Excel Sheets that contain a block of data 12 rows deep and 55 columns across, this...
6
2032
by: Ham | last post by:
Yeah, Gotto work with my VB.Net graphic application for days, do any possible type of code optimization, check for unhandled errors and finally come up with sth that can't process 2D graphics and photos at an acceptable speed. I have heard things about the virtual machine of Mr. Net, that it can run my app at a high speed....but could never compare it with Java VM and its speed. Then, what should i do? Go and learn C++ ? Do i have time for...
2
1381
by: Frank Milverckowitz | last post by:
Hi, I'm curious to know (need to tell my boss what to expect) how long it might take to come up to speed making the move from Java / JSP to C# ASP.NET I know there are a million factors... but just curious to know how much time other experienced java people spent to come up to speed with .NET thanks,
184
7121
by: jim | last post by:
In a thread about wrapping .Net applications using Thinstall and Xenocode, it was pointed out that there may be better programming languages/IDEs to use for the purpose of creating standalone, single executable apps. My goal is to create desktop applications for use on Windows XP+ OSs that are distributed as single executables that do not require traditional install packages to run. I would like to use a drag and drop UI development...
318
11131
by: King Raz | last post by:
The shootout site has benchmarks comparing different languages. It includes C# Mono vs Java but not C# .NET vs Java. So I went through all the benchmark on the site ... http://kingrazi.blogspot.com/2008/05/shootout-c-net-vs-java-benchmarks.html Just to keep the post on topic for my friends at comp.lang.c++, how do I play default windows sounds with C++?
0
9628
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
10289
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...
0
10120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7471
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
6722
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
5367
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5493
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4031
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3622
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.