Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > asp code parser and analyzer

Reply
Thread Tools

asp code parser and analyzer

 
 
Vadym Stetsyak
Guest
Posts: n/a
 
      05-25-2005
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


 
Reply With Quote
 
 
 
 
Roland Hall
Guest
Posts: n/a
 
      05-26-2005
"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


 
Reply With Quote
 
 
 
 
Vadym Stetsyak
Guest
Posts: n/a
 
      05-26-2005
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
>
>



 
Reply With Quote
 
Adrienne
Guest
Posts: n/a
 
      05-26-2005
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
 
Reply With Quote
 
Vadym Stetsyak
Guest
Posts: n/a
 
      05-26-2005
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&v ar=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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JSP Code Review Tool or Syntax Analyzer? scottleff@hotmail.com Java 1 08-05-2011 06:36 AM
What was that Java code analyzer link someone posted a few days ago? Alex Hunsley Java 6 03-28-2006 03:20 PM
Source code analyzer tools for J2SE / J2EE code base Manfred Schneider Java 6 12-17-2005 12:39 PM
Code/Object analyzer for fixing Software C Programming 4 03-07-2004 03:20 PM
Java code analyzer recommendations? Harpstein Java 7 11-18-2003 09:43 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57