473,405 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Making .net Applications Run Faster

Hi!

How can i make the .net applications run faster on user computers. I have
used .net a lot and proagrammed int it. But the applications developed using
..net framework are very slow when compared to other progrmming tools like
VB6.
Nov 16 '05 #1
7 4659
Are you doing a lot of string concatenation? If you are, you should be
using a StringBuilder class instead. In .NET, string concatination creates
new strings. Lots of string concatination requires a lot of copying of
strings and creates a lot of garbage. Lots of garbage requires frequent
garbage collection, which slows things down.

Also, be sure that you aren't deploying a debug build of the application.
Debug builds prevent the CLR JIT compiler from performing many
optimizations.

You might also want to watch this episode
(http://msdn.microsoft.com/theshow/Ep...27/default.asp) of the .NET Show
on MSDN. They talk about opitimizing .NET code. The chief topic is how the
garbage collector works and how you should code accordingly.

"Manu" <cr***********@hotmail.com> wrote in message
news:Ob**************@TK2MSFTNGP12.phx.gbl...
Hi!

How can i make the .net applications run faster on user computers. I have
used .net a lot and proagrammed int it. But the applications developed using .net framework are very slow when compared to other progrmming tools like
VB6.

Nov 16 '05 #2
..net applications will generally run faster that VB6 applications,
unless they are natively compiled. I would strongly recommend using
tools like DevPartner to find performance bottlenecks in your application

Manu wrote:
Hi!

How can i make the .net applications run faster on user computers. I have
used .net a lot and proagrammed int it. But the applications developed using
..net framework are very slow when compared to other progrmming tools like
VB6.


--
Regards,
Dilip Krishnan
MCAD, MCSD.net
dilipdotnet at apdiya dot com
Nov 16 '05 #3
Scott English <no****@nospam.com> wrote:
Also, be sure that you aren't deploying a debug build of the application.
Debug builds prevent the CLR JIT compiler from performing many
optimizations.


No they don't - running any code in the debugger does.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #4
True, attaching the debugger *really" slows things down, but even a debug
build will prevent the JIT compiler from performing optimizations. The
debuggable code needs to be in a format that can be correlated with the
source code. This prevents the JIT compiler from performing many
optimizations. Even if the debugger isn't connected to the application when
the code is running, the JIT compiler has to compile the code such that a
debugger could later be attached (otherwise, you wouldn't be able to attach
a debugger to a running application and debug it).

See http://msdn.microsoft.com/theshow/ep...scriptText.asp and
search for "debug" and "optimize".

"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Scott English <no****@nospam.com> wrote:
Also, be sure that you aren't deploying a debug build of the application. Debug builds prevent the CLR JIT compiler from performing many
optimizations.


No they don't - running any code in the debugger does.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 16 '05 #5
Scott English <no****@nospam.com> wrote:
True, attaching the debugger *really" slows things down, but even a debug
build will prevent the JIT compiler from performing optimizations.
Not in my experience.
The debuggable code needs to be in a format that can be correlated with the
source code.
Well, there just needs to be an extra file (the pdb)...
This prevents the JIT compiler from performing many
optimizations. Even if the debugger isn't connected to the application when
the code is running, the JIT compiler has to compile the code such that a
debugger could later be attached (otherwise, you wouldn't be able to attach
a debugger to a running application and debug it).

See http://msdn.microsoft.com/theshow/ep...scriptText.asp and
search for "debug" and "optimize".


Well, that's using the specific example of cordbg (assuming I'm looking
at the same piece that you are) - but even then it says that you can
tell cordbg to enable optimisations, even on that code which has been
compiled in debug mode.

Can you provide a benchmarking example which displays this behaviour?
In other words, which when compiled with debug information but launched
directly from the command line takes longer to execute than the same
code compiled without debug information? (Without resorting to things
which generate stack traces.)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #6
Thanx Scott!!

I have found some informaion on the .net framwework's site. Under the
performance section.


Nov 16 '05 #7
I've just done some benchmarking myself, and I entirely withdraw my
comments. You're exactly right - it can make a huge difference.

Sorry!

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #8

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

Similar topics

7
by: Unknown User | last post by:
I am a Python programmer and I'm thinking about learning PHP, which is similar to C++ (quite different from Python). I want to start writing web applications. Do you think if I learn PHP I'll...
7
by: Manu | last post by:
Hi! How can i make the .net applications run faster on user computers. I have used .net a lot and proagrammed int it. But the applications developed using ..net framework are very slow when...
5
by: Charlie | last post by:
Hi: I'm working on an e-commerce site. Using the SMTP class, my site sends out confirmation messages. It works most of the time, but sometimes raises an error. I need a way of making sure it...
351
by: CBFalconer | last post by:
We often find hidden, and totally unnecessary, assumptions being made in code. The following leans heavily on one particular example, which happens to be in C. However similar things can (and...
2
by: gen_tricomi | last post by:
THE IMPORTANCE OF MAKING THE GOOGLE INDEX DOWNLOADABLE I write here to make a request on behalf of all the programmers on earth who have been or are intending to use the Google web search API...
26
by: gabry.morelli | last post by:
Is it possible to create an .ADP application (in Access 2003) without having to connect SQL Server but using directly the tables and queries inside the .ADP file? Thanks
8
by: Peter Michaux | last post by:
Hi, I'm sure many here have already noticed this but it seems that the development of the browser world is paralleling the development of the computer world. However, the browser world is about...
46
by: ahmed.maryam | last post by:
Hi all, I have 2 C# applications that I need to pass data between. Specifically XML information such as a document or node name. How can I do that? Thanks in advance! ~ Maryam
23
by: Python Maniac | last post by:
I am new to Python however I would like some feedback from those who know more about Python than I do at this time. def scrambleLine(line): s = '' for c in line: s += chr(ord(c) | 0x80)...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...
0
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...
0
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...
0
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,...
0
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...

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.