473,800 Members | 2,659 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can Someone Change My Mind About .NET?

Hello

I come from the world of C++ programming, and I'm used to writing programs that are actually executed by the CPU, and that run with some semblance of performance. I have taken the time to explore this .NET thing, and found that not only do .NET applications run extremely s-l-o-w-l-y, but the various .NET languages amount to nothing more than interpreted script languages. It is the common language run-time that actually executes your implementation

I deeply resent this move toward "managed" code, and I'm disappointed that the new Avalon user interface system in Longhorn will use only .NET facilities. Is this an indication that subsequent versions of Windows will allow ONLY interpreted applications

Does anyone else share my feelings about this situation? Can anyone put forth some reason that I should feel better about embracing .NET, when it is so alien to me

Sincerely
Mike
Jul 21 '05 #1
42 2057
Mike P. <an*******@disc ussions.microso ft.com> wrote:
I come from the world of C++ programming, and I'm used to writing
programs that are actually executed by the CPU, and that run with
some semblance of performance. I have taken the time to explore this
.NET thing, and found that not only do .NET applications run
extremely s-l-o-w-l-y, but the various .NET languages amount to
nothing more than interpreted script languages. It is the common
language run-time that actually executes your implementation.
1) They're not interpreted. They're JIT-compiled. This is a huge
difference.
2) They don't run extremely slowly. What makes you think they do?
Certainly Windows Forms take a while to start up, and the
performance of those isn't as good as it could be - but that's
not true of the whole of .NET. What in particular are you finding
is running very slowly?
I deeply resent this move toward "managed" code, and I'm disappointed
that the new Avalon user interface system in Longhorn will use only
.NET facilities. Is this an indication that subsequent versions of
Windows will allow ONLY interpreted applications?
Certainliy not, as .NET isn't interpreted to start with.
Does anyone else share my feelings about this situation? Can anyone
put forth some reason that I should feel better about embracing .NET,
when it is so alien to me?


My guess is that you're trying to write .NET code as if it were normal
C++, rather than embracing .NET idioms. Writing code as if it were for
another platform is always going to give you nasty problems such as
performance and reliability.

--
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
Mike P. <an*******@disc ussions.microso ft.com> wrote:
I come from the world of C++ programming, and I'm used to writing
programs that are actually executed by the CPU, and that run with
some semblance of performance. I have taken the time to explore this
.NET thing, and found that not only do .NET applications run
extremely s-l-o-w-l-y, but the various .NET languages amount to
nothing more than interpreted script languages. It is the common
language run-time that actually executes your implementation.
1) They're not interpreted. They're JIT-compiled. This is a huge
difference.
2) They don't run extremely slowly. What makes you think they do?
Certainly Windows Forms take a while to start up, and the
performance of those isn't as good as it could be - but that's
not true of the whole of .NET. What in particular are you finding
is running very slowly?
I deeply resent this move toward "managed" code, and I'm disappointed
that the new Avalon user interface system in Longhorn will use only
.NET facilities. Is this an indication that subsequent versions of
Windows will allow ONLY interpreted applications?
Certainliy not, as .NET isn't interpreted to start with.
Does anyone else share my feelings about this situation? Can anyone
put forth some reason that I should feel better about embracing .NET,
when it is so alien to me?


My guess is that you're trying to write .NET code as if it were normal
C++, rather than embracing .NET idioms. Writing code as if it were for
another platform is always going to give you nasty problems such as
performance and reliability.

--
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 #3
Jon

Thank you for your thoughtful reply.

One reason that I believe .NET apps run very slowly is that I wrote an HTTP proxy server in Visual Basic .NET. Then I wrote an identical program in MFC. The MFC program ran many times faster. When I tested them both with Internet Explorer as the client, I saw no noticeable change in IE's performance when using the MFC proxy, while there was a serious degredation in performance with the .NET proxy

And what about the fact that you can view the code for any program just by using the disassembler utility? Am I forced to buy a multi-thousand dollar obfuscator package if I want to make a commercial app

Thank you

Jul 21 '05 #4
Jon

Thank you for your thoughtful reply.

One reason that I believe .NET apps run very slowly is that I wrote an HTTP proxy server in Visual Basic .NET. Then I wrote an identical program in MFC. The MFC program ran many times faster. When I tested them both with Internet Explorer as the client, I saw no noticeable change in IE's performance when using the MFC proxy, while there was a serious degredation in performance with the .NET proxy

And what about the fact that you can view the code for any program just by using the disassembler utility? Am I forced to buy a multi-thousand dollar obfuscator package if I want to make a commercial app

Thank you

Jul 21 '05 #5
Mike P. <an*******@disc ussions.microso ft.com> wrote:
Thank you for your thoughtful reply.

One reason that I believe .NET apps run very slowly is that I wrote
an HTTP proxy server in Visual Basic .NET. Then I wrote an identical
program in MFC. The MFC program ran many times faster. When I tested
them both with Internet Explorer as the client, I saw no noticeable
change in IE's performance when using the MFC proxy, while there was
a serious degredation in performance with the .NET proxy.
Without seeing your code, I can't say what's wrong - but chances are
it's in your code rather than in .NET itself. One thing to check to
start with - do you have Option Strict On at the top of all your code?
If not, some or all method calls will be performed with reflection,
which *is* horribly slow - and unnecessary.

It shouldn't come as a surprise though - you can't expect to
immediately write the same quality of code on a new platform as on one
you're intimately familiar with. It takes a little while to get back up
to speed. That's not a reflection of the platform itself, however.

If this proxy is small enough to post, we could see if we can see
what's wrong. I may well not be able to contribute very much myself,
being a C# programmer rather than a VB.NET programmer. I would be able
to spot *some* potential flaws, but not all. Fortunately, there are
plenty of very competent VB.NET users in this newsgroup who could help,
I'm sure.
And what about the fact that you can view the code for any program
just by using the disassembler utility? Am I forced to buy a
multi-thousand dollar obfuscator package if I want to make a
commercial app?


See http://www.pobox.com/~skeet/csharp/faq/#obfuscation for reasons why
I think obfuscation is sufficient. There are already free obfuscators
around (I believe) and my guess is that more and more of them will
spring up, and get better and better - this is what has happened in the
Java space, certainly.

--
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 #6
Mike P. <an*******@disc ussions.microso ft.com> wrote:
Thank you for your thoughtful reply.

One reason that I believe .NET apps run very slowly is that I wrote
an HTTP proxy server in Visual Basic .NET. Then I wrote an identical
program in MFC. The MFC program ran many times faster. When I tested
them both with Internet Explorer as the client, I saw no noticeable
change in IE's performance when using the MFC proxy, while there was
a serious degredation in performance with the .NET proxy.
Without seeing your code, I can't say what's wrong - but chances are
it's in your code rather than in .NET itself. One thing to check to
start with - do you have Option Strict On at the top of all your code?
If not, some or all method calls will be performed with reflection,
which *is* horribly slow - and unnecessary.

It shouldn't come as a surprise though - you can't expect to
immediately write the same quality of code on a new platform as on one
you're intimately familiar with. It takes a little while to get back up
to speed. That's not a reflection of the platform itself, however.

If this proxy is small enough to post, we could see if we can see
what's wrong. I may well not be able to contribute very much myself,
being a C# programmer rather than a VB.NET programmer. I would be able
to spot *some* potential flaws, but not all. Fortunately, there are
plenty of very competent VB.NET users in this newsgroup who could help,
I'm sure.
And what about the fact that you can view the code for any program
just by using the disassembler utility? Am I forced to buy a
multi-thousand dollar obfuscator package if I want to make a
commercial app?


See http://www.pobox.com/~skeet/csharp/faq/#obfuscation for reasons why
I think obfuscation is sufficient. There are already free obfuscators
around (I believe) and my guess is that more and more of them will
spring up, and get better and better - this is what has happened in the
Java space, certainly.

--
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 #7
> I come from the world of C++ programming, and I'm used to writing programs
that
are actually executed by the CPU, and that run with some semblance of performance. I have taken the time to explore this .NET thing, and found that not only do .NETapplications run extremely s-l-o-w-l-y, but the various .NET languages amount to nothing more than interpreted script languages. It is the common language run-time that actually executes your implementation. Tests with C# here suggests that we have almost the same speed of our MFC
programs.
The JIT compiler needs time to compile the interediate language into native
cpu code, and that explains why the .NET program starts up slower, but if
you create the program with .NET design phylisophy and not MFC like
phylisophy, then it should reach the same speeds.
I deeply resent this move toward "managed" code, and I'm disappointed that the new Avalon user interface system in Longhorn will use only .NET facilities. Is this an indication that subsequent versions of Windows will allow ONLY interpreted applications?
The biggest advantage if .NET is that it will improve security issuses since
the security is integrated into the code.
An OS based on .NET code will be far less vunerable for the current types of
worms and virusses. And I think the rest of the world would prefer an little
bit more secure windows that crashes less than a incredible fast computer.

Also note that, .NET programs will run faster compared to conventional
executable in the future since the Windows core is beeing replaced by pure
..NET technology.
It is the transition between managed and unmanaged that takes lots of time.
So it explains why .NET programs now are still a little bit slower since the
Windows core is still unmanaged and .NET prigrams must go through that
transition every time. When Longhorn is out, it wil be reversed. .NET will
be faster than conventional executables now.
Does anyone else share my feelings about this situation? Can anyone put forth some reason that I should feel better about embracing .NET, when it is so alien to me?

I understand the you completely that itis very confusing learning to program
in a .NET way, but you have to trust all the people here that it is the way
to go for future operating systems and programming languages. But it has a
steep learning curve as the technology matures.

Jul 21 '05 #8
> I come from the world of C++ programming, and I'm used to writing programs
that
are actually executed by the CPU, and that run with some semblance of performance. I have taken the time to explore this .NET thing, and found that not only do .NETapplications run extremely s-l-o-w-l-y, but the various .NET languages amount to nothing more than interpreted script languages. It is the common language run-time that actually executes your implementation. Tests with C# here suggests that we have almost the same speed of our MFC
programs.
The JIT compiler needs time to compile the interediate language into native
cpu code, and that explains why the .NET program starts up slower, but if
you create the program with .NET design phylisophy and not MFC like
phylisophy, then it should reach the same speeds.
I deeply resent this move toward "managed" code, and I'm disappointed that the new Avalon user interface system in Longhorn will use only .NET facilities. Is this an indication that subsequent versions of Windows will allow ONLY interpreted applications?
The biggest advantage if .NET is that it will improve security issuses since
the security is integrated into the code.
An OS based on .NET code will be far less vunerable for the current types of
worms and virusses. And I think the rest of the world would prefer an little
bit more secure windows that crashes less than a incredible fast computer.

Also note that, .NET programs will run faster compared to conventional
executable in the future since the Windows core is beeing replaced by pure
..NET technology.
It is the transition between managed and unmanaged that takes lots of time.
So it explains why .NET programs now are still a little bit slower since the
Windows core is still unmanaged and .NET prigrams must go through that
transition every time. When Longhorn is out, it wil be reversed. .NET will
be faster than conventional executables now.
Does anyone else share my feelings about this situation? Can anyone put forth some reason that I should feel better about embracing .NET, when it is so alien to me?

I understand the you completely that itis very confusing learning to program
in a .NET way, but you have to trust all the people here that it is the way
to go for future operating systems and programming languages. But it has a
steep learning curve as the technology matures.

Jul 21 '05 #9
If possible, post your core network loop. I have not seen perf issues with
the network classes. Naturally, it will probably be a little slower then
calling win32 and winsock directly, but should not get the results you
describe.

--
William Stacey, MVP

"Mike P." <an*******@disc ussions.microso ft.com> wrote in message
news:7D******** *************** ***********@mic rosoft.com...
Jon,

Thank you for your thoughtful reply.

One reason that I believe .NET apps run very slowly is that I wrote an HTTP proxy server in Visual Basic .NET. Then I wrote an identical
program in MFC. The MFC program ran many times faster. When I tested them
both with Internet Explorer as the client, I saw no noticeable change in
IE's performance when using the MFC proxy, while there was a serious
degredation in performance with the .NET proxy.
And what about the fact that you can view the code for any program just by using the disassembler utility? Am I forced to buy a multi-thousand
dollar obfuscator package if I want to make a commercial app?
Thank you.


Jul 21 '05 #10

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

Similar topics

1
1531
by: Margaret MacDonald | last post by:
....before I lose what remains of my mind? The problem is that the tetragraph 'PPLL' is apparently not being recognised for some reason I can't begin to see. The test code is: echo 'before the if: ' . $field . '<br>' ; if ( $field == 'PPLL' ) {
5
4061
by: Ryan | last post by:
I have some software (written in Delphi 5) which has been working for several months without a problem. I have been given a copy of the database on our development server (SQL 7) and have pointed the software to this. So, nothing has changed with the software. In theory the servers should be the same. However, if I try to make a small change to any record (as I would on the 'live' system), I get an error stating that another user is...
4
1474
by: Mike | last post by:
Hello, I'm interested in changing appearance of browser using ASP. For example, remove location bar, toolbar, menubar, statusbar (much like the browser interface on posting a question on this forum). I know how to use the DOM object: window.open(url,list) but I need to use the same fucntionality using ASP, or use ASP to reference
9
5000
by: TCMA | last post by:
I am looking for some tools to help me understand source code of a program written in C++ by someone else. Are there any non-commercial, open source C or C++ tools to reverse engineer C or C++ programs with source codes on linux? i.e. It parses any sized C or C++ project to help reverse engineer, document, draw UML diagram and understand it and thus maintain it better.
9
1877
by: bounce | last post by:
Hello, Consider the following HTML: <form action="/cgi-bin/mailmanager.pl" method="post"> <input type="hidden" name="recipient" value="bounce@springbock.net"> <input type="hidden" name="subject" value="some value"> <p><input type="submit" value="Submit"></p> </form>
4
1097
by: Merlin | last post by:
Hey All, I`ll Pay someone to tell me this now, as its doing my head in, I carn`t see out on the net and no one seems to know! I have a form that connects to a Access database, and I have a combo box on this form (this combo box has a list of Access Levels, a user would be able to choose one Access Level out of the combo box). The combo box is serving double duty, as they usually do, it is giving me a
24
372
by: Mike P. | last post by:
Hello I come from the world of C++ programming, and I'm used to writing programs that are actually executed by the CPU, and that run with some semblance of performance. I have taken the time to explore this .NET thing, and found that not only do .NET applications run extremely s-l-o-w-l-y, but the various .NET languages amount to nothing more than interpreted script languages. It is the common language run-time that actually executes your...
10
1574
by: Miro | last post by:
I wanted certain text boxes ( only certain ones ) to always be Trim'd so that spaces are not in the begining, nor the end of the text entered. I created my own "Handle ?" - i hope thats the right terminology, and it works. Is this the right way to do this? I had to use DirectCast to get the textbox name. Private Sub TrimValues(ByVal sender As System.Object, ByVal e As EventArgs) _
5
1885
by: raha | last post by:
hi. Is there any body to help me? I am writing a web program. I have some forms. each form have some controls and users can edit the controls. finally they can save their forms. I would like to add an ability to my program. In fact I want to have an Icon that change, when a user change the value of a control of form such as textbox , radiobox, grid. as you know the most famous and important editors such as PSPAD or
0
9691
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
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10507
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
10036
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6815
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
5473
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
5607
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4150
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
3765
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.