Compiler warnings and performance

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?Y2FzaGRlc2ttYWM=?=

    Compiler warnings and performance

    Hi,

    I have built an application containing a few projects (nothing that I have
    written)and there are a few compiler warnings (obsolete methods and the like).

    Does anyone know if these obsolete methods cause any performance issues if
    not corrected? I would imagine that they do, but would be interested to know
    to what extent.
  • Peter Duniho

    #2
    Re: Compiler warnings and performance

    On Tue, 22 Apr 2008 08:17:02 -0700, cashdeskmac
    <cashdeskmac@di scussions.micro soft.comwrote:
    I have built an application containing a few projects (nothing that I
    have
    written)and there are a few compiler warnings (obsolete methods and the
    like).
    >
    Does anyone know if these obsolete methods cause any performance issues
    if
    not corrected? I would imagine that they do, but would be interested to
    know
    to what extent.
    Why would they?

    Deprecated/obsolete methods usually happen because the .NET designers feel
    they came up with a better way to do something. That doesn't necessarily
    mean that the older way performed more poorly.

    If you have a specific example, I'm sure some specific advice can be
    offered. Other than that, I'd say that the general rule of thumb is to
    try hard to avoid having warnings in your code. Not because they might
    imply poor performance, but because they are usually telling you something
    important about the way you wrote your code that could lead to other
    problems (such as incorrect output, lack of a future-proof upgrade path,
    etc.).

    Pete

    Comment

    • Greg

      #3
      Re: Compiler warnings and performance

      On Apr 22, 8:17 am, cashdeskmac
      <cashdesk...@di scussions.micro soft.comwrote:
      Hi,
      >
      I have built an application containing a few projects (nothing that I have
      written)and there are a few compiler warnings (obsolete methods and the like).
      >
      Does anyone know if these obsolete methods cause any performance issues if
      not corrected?  I would imagine that they do, but would be interested toknow
      to what extent.
      IMHO, I think performance concerns should be the least of your worries
      if you have code with obsolete warings.
      I would have to assume there isn't any way to measure performance
      using obsolete api's on a machine with multiple .NET runtimes.


      Comment

      • =?Utf-8?B?Y2FzaGRlc2ttYWM=?=

        #4
        Re: Compiler warnings and performance

        As I said, it wasn't code that I had written. This is part of an application
        containing over 380 projects and which has been upgraded from v1.1 to v3.0 in
        the last few months. It has also had an upgrade to a third party data
        retrieval layer and it is this which is creating all of the obselete method
        warnings. As is often the case, though, there is no money to pay for a clean
        up of the code, so things will probably be left as they are.

        Comment

        Working...