asp code parser and analyzer

Discussion in 'ASP General' started by Vadym Stetsyak, May 25, 2005.

  1. Hi, All

    I have a legacy ASP application, which is full of memory leaks. The source
    of the leaks are ADO objects that were not closed.
    For exapmle "Open" recordset without "Close" and so on.

    As the application is rather big, manually parsing asp code is rather
    painfully.

    Are there any asp code parsing tools, to analyze the source code?

    TIA



    --
    Vadym Stetsyak
    Vadym Stetsyak, May 25, 2005
    #1
    1. Advertising

  2. Vadym Stetsyak

    Roland Hall Guest

    "Vadym Stetsyak" wrote in message
    news:eUb0%...
    : I have a legacy ASP application, which is full of memory leaks. The source
    : of the leaks are ADO objects that were not closed.
    : For exapmle "Open" recordset without "Close" and so on.
    :
    : As the application is rather big, manually parsing asp code is rather
    : painfully.
    :
    : Are there any asp code parsing tools, to analyze the source code?

    Not sure but objects are defined with the word 'set'. So it shouldn't be
    that hard to find them.

    --
    Roland Hall
    /* This information is distributed in the hope that it will be useful, but
    without any warranty; without even the implied warranty of merchantability
    or fitness for a particular purpose. */
    Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
    WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
    MSDN Library - http://msdn.microsoft.com/library/default.asp
    Roland Hall, May 26, 2005
    #2
    1. Advertising

  3. Yes, that is not too difficult.
    Also when you call Open for the recordset object and do not call Close it is
    the source of mem leaks.

    So to detect the mem leak I have to debug the page under different
    conditions, it takes time. That is why I posted this message, about code
    analyzers...


    "Roland Hall" <nobody@nowhere> wrote in message
    news:#...
    > "Vadym Stetsyak" wrote in message
    > news:eUb0%...
    > : I have a legacy ASP application, which is full of memory leaks. The

    source
    > : of the leaks are ADO objects that were not closed.
    > : For exapmle "Open" recordset without "Close" and so on.
    > :
    > : As the application is rather big, manually parsing asp code is rather
    > : painfully.
    > :
    > : Are there any asp code parsing tools, to analyze the source code?
    >
    > Not sure but objects are defined with the word 'set'. So it shouldn't be
    > that hard to find them.
    >
    > --
    > Roland Hall
    > /* This information is distributed in the hope that it will be useful, but
    > without any warranty; without even the implied warranty of merchantability
    > or fitness for a particular purpose. */
    > Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
    > WSH 5.6 Documentation -

    http://msdn.microsoft.com/downloads/list/webdev.asp
    > MSDN Library - http://msdn.microsoft.com/library/default.asp
    >
    >
    Vadym Stetsyak, May 26, 2005
    #3
  4. Vadym Stetsyak

    Adrienne Guest

    Gazing into my crystal ball I observed "Vadym Stetsyak" <>
    writing in news:#:

    > Yes, that is not too difficult.
    > Also when you call Open for the recordset object and do not call Close
    > it is the source of mem leaks.
    >
    > So to detect the mem leak I have to debug the page under different
    > conditions, it takes time. That is why I posted this message, about
    > code analyzers...


    You could roll your own. Using FSO, you could read the files and search
    for ".Open". If ".Open" was found, then search for ".Close". If ".Close"
    was not found, then you could find the name of the recordset using MID
    function, and then write to the document. Just a thought, not tested.

    >
    >
    > "Roland Hall" <nobody@nowhere> wrote in message
    > news:#...
    >> "Vadym Stetsyak" wrote in message
    >> news:eUb0%...
    >> : I have a legacy ASP application, which is full of memory leaks. The
    >> : source of the leaks are ADO objects that were not closed.
    >> : For exapmle "Open" recordset without "Close" and so on.
    >> :
    >> : As the application is rather big, manually parsing asp code is
    >> : rather painfully.
    >> :
    >> : Are there any asp code parsing tools, to analyze the source code?
    >>
    >> Not sure but objects are defined with the word 'set'. So it shouldn't
    >> be that hard to find them.
    >>
    >> --
    >> Roland Hall
    >> /* This information is distributed in the hope that it will be useful,
    >> but without any warranty; without even the implied warranty of
    >> merchantability or fitness for a particular purpose. */
    >> Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
    >> WSH 5.6 Documentation -
    >> http://msdn.microsoft.com/downloads/list/webdev.asp MSDN Library -
    >> http://msdn.microsoft.com/library/default.asp
    >>
    >>

    >
    >
    >




    --
    Adrienne Boswell
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne, May 26, 2005
    #4
  5. At first I thought of something like injecting additional code
    after the "Set", "Open", "Close" statements
    the code would be something like

    Server.Execute("report.asp?page=test.asp&line=34&var=rs&action=open")

    and on report.asp gather the statistics. It will be like obtaining dynamic
    call stack of the page.

    We can parse an asp file statically, but we shall not be able to reproduce
    dynamic behavior ( conditions based on some values and so on )
    "Adrienne" <> wrote in message
    news:Xns9662183FDC240arbpenyahoocom@207.115.63.158...
    > Gazing into my crystal ball I observed "Vadym Stetsyak" <>
    > writing in news:#:
    >
    > > Yes, that is not too difficult.
    > > Also when you call Open for the recordset object and do not call Close
    > > it is the source of mem leaks.
    > >
    > > So to detect the mem leak I have to debug the page under different
    > > conditions, it takes time. That is why I posted this message, about
    > > code analyzers...

    >
    > You could roll your own. Using FSO, you could read the files and search
    > for ".Open". If ".Open" was found, then search for ".Close". If ".Close"
    > was not found, then you could find the name of the recordset using MID
    > function, and then write to the document. Just a thought, not tested.
    >
    > >
    > >
    > > "Roland Hall" <nobody@nowhere> wrote in message
    > > news:#...
    > >> "Vadym Stetsyak" wrote in message
    > >> news:eUb0%...
    > >> : I have a legacy ASP application, which is full of memory leaks. The
    > >> : source of the leaks are ADO objects that were not closed.
    > >> : For exapmle "Open" recordset without "Close" and so on.
    > >> :
    > >> : As the application is rather big, manually parsing asp code is
    > >> : rather painfully.
    > >> :
    > >> : Are there any asp code parsing tools, to analyze the source code?
    > >>
    > >> Not sure but objects are defined with the word 'set'. So it shouldn't
    > >> be that hard to find them.
    > >>
    > >> --
    > >> Roland Hall
    > >> /* This information is distributed in the hope that it will be useful,
    > >> but without any warranty; without even the implied warranty of
    > >> merchantability or fitness for a particular purpose. */
    > >> Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
    > >> WSH 5.6 Documentation -
    > >> http://msdn.microsoft.com/downloads/list/webdev.asp MSDN Library -
    > >> http://msdn.microsoft.com/library/default.asp
    > >>
    > >>

    > >
    > >
    > >

    >
    >
    >
    > --
    > Adrienne Boswell
    > http://www.cavalcade-of-coding.info
    > Please respond to the group so others can share
    Vadym Stetsyak, May 26, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Harpstein
    Replies:
    7
    Views:
    577
    Harpstein
    Nov 18, 2003
  2. Replies:
    1
    Views:
    4,037
  3. Manfred Schneider
    Replies:
    6
    Views:
    3,154
    Manfred Schneider
    Dec 17, 2005
  4. Alex Hunsley
    Replies:
    6
    Views:
    465
    opalinski from opalpaweb
    Mar 28, 2006
  5. Software

    Code/Object analyzer for fixing

    Software, Mar 5, 2004, in forum: C Programming
    Replies:
    4
    Views:
    338
    Rob Thorpe
    Mar 7, 2004
Loading...

Share This Page