|
Home > Archive > IIS ASP > May 2005 > asp code parser and analyzer
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
asp code parser and analyzer
|
|
| Vadym Stetsyak 2005-05-25, 6:01 pm |
| 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
| |
| Roland Hall 2005-05-26, 2:52 am |
| "Vadym Stetsyak" wrote in message
news:eUb0%23pTYFHA.796@TK2MSFTNGP10.phx.gbl...
: 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 2005-05-26, 2:52 am |
| 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:#4hJUbbYFHA.2288@TK2MSFTNGP14.phx.gbl...
> "Vadym Stetsyak" wrote in message
> news:eUb0%23pTYFHA.796@TK2MSFTNGP10.phx.gbl...
> : 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 2005-05-26, 8:05 am |
| Gazing into my crystal ball I observed "Vadym Stetsyak" <vadym_s@ukr.net>
writing in news:#YMc4LcYFHA.2124@TK2MSFTNGP14.phx.gbl:
> 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:#4hJUbbYFHA.2288@TK2MSFTNGP14.phx.gbl...
>
>
>
--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
| |
| Vadym Stetsyak 2005-05-26, 8:05 am |
| 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" <arbpen2003@sbcglobal.net> wrote in message
news:Xns9662183FDC240arbpenyahoocom@207.115.63.158...
> Gazing into my crystal ball I observed "Vadym Stetsyak" <vadym_s@ukr.net>
> writing in news:#YMc4LcYFHA.2124@TK2MSFTNGP14.phx.gbl:
>
>
> 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.
>
>
>
>
> --
> Adrienne Boswell
> http://www.cavalcade-of-coding.info
> Please respond to the group so others can share
|
|
|
|
|