Improve performance

  • Thread starter Thread starter Christian Havel
  • Start date Start date
C

Christian Havel

Hi,

I am looking for a source (e.g. book) how to improve the performance of C#
applications.

Christian
 
Christian Havel said:
I am looking for a source (e.g. book) how to improve the performance of C#
applications.

Two words: measure, profile

Once you've isolated the cause of any performance bottlenecks, actually
fixing them is often reasonably straightforward.

Rico Mariani's blog has lots of good tips.
 
Hi,

You need first to nderstand the best practices in .NET and C#. cause
otherwise, even if you find a bottleneck, how are you going to solve it? :)
Check Jon Skeet's book. Also in MSDN you will find lot of articles about
what best practices to follow. Like how to better compare strings, string
concatenation, etc
 
Christian Havel kirjoitti:
Hi,

I am looking for a source (e.g. book) how to improve the performance of C#
applications.

Reimplementing algorithms might help also. For example, the program I am
working on compared hundreds of XML files. There is a master file that
lists names that can occure on other files. Older version used xpath to
search name from the master file and then from the file to be compared.
I put the master file's names to SortedDictionary<string,XmlElement> and
did the same for each file to be compared. Then I used merge, i.e.
walked the names in alphabetical order and each time I found a name in
the compared file that was missing in the master file, reported the
name. The old comparison took about 15 minutes, the new one about 15
seconds.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top