473,840 Members | 1,642 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Memory usage and large number of pages

I have migrated my asp application to asp.net some time ago - but I am still
having some difficulties in understanding the best way to mange some tasks.

I currently have a page that loads a aspx web page - this page is
continually refreshed - every 5 seconds or so. To do this I use the download
behavior on the client to call a particular page - say newchart.aspx. The
newchart.aspx than calls a custom component (vb app on another machine using
dcom) and this app goes and creates a chartXXX.aspx file in the temp
directory on the web server. newchart.aspx than calls this chart123.aspx and
returns the result of this page back to the client. chartXXX.aspx is unique
for every call.

On each call the memory on the server increases - until the point it resets.
I used this method in asp extensively and never had these problems - but the
changes in asp.net means that this is not be best way to do this.

Can anyone suggest to me a better way of managing something like this??

My custom app on the remote computer has the smarts of what needs to be
returned to the client and sometimes it simply writes a html page to the temp
directory and this gets returned to the client - this causes no problem - the
difficulty happens when a aspx file is written.
--
matthew
Nov 19 '05 #1
7 1474
Matthew:
Your process seems complicated. I don't know enough to say that there's a
better way to do everything, I merely state that to indicate how hard this
is going to be to fix things. ASP.Net will automatically recycle itself
after it just-in-time compiles X amount of pages. From what you describe,
it seems like every 5 seconds for every user a new page is created, forcing
ASP.Net to have to recompile it. I would suspect that you'd quickly run
into problems this way (however, I doubt that's, in any way, associated with
your memory problem). Just a comment of something you should be aware of.

You might want to build your entire reload/dynamic creation framework on a
much lighterweight protocol. Again, I don't fully understand what you are
doing, but it would seem AJAX might be able to help you here. This would
let you asynchronously send whatever data back to your original page
without having to reload or recreate new pages. You can learn more about
this from: http://ajax.schwarz-interactive.de/c...e/default.aspx

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"matvdl" <ma****@discuss ions.microsoft. com> wrote in message
news:36******** *************** ***********@mic rosoft.com...
I have migrated my asp application to asp.net some time ago - but I am
still
having some difficulties in understanding the best way to mange some
tasks.

I currently have a page that loads a aspx web page - this page is
continually refreshed - every 5 seconds or so. To do this I use the
download
behavior on the client to call a particular page - say newchart.aspx. The
newchart.aspx than calls a custom component (vb app on another machine
using
dcom) and this app goes and creates a chartXXX.aspx file in the temp
directory on the web server. newchart.aspx than calls this chart123.aspx
and
returns the result of this page back to the client. chartXXX.aspx is
unique
for every call.

On each call the memory on the server increases - until the point it
resets.
I used this method in asp extensively and never had these problems - but
the
changes in asp.net means that this is not be best way to do this.

Can anyone suggest to me a better way of managing something like this??

My custom app on the remote computer has the smarts of what needs to be
returned to the client and sometimes it simply writes a html page to the
temp
directory and this gets returned to the client - this causes no problem -
the
difficulty happens when a aspx file is written.
--
matthew

Nov 19 '05 #2
Karl,

Thanks for the response - it was helpfull.

The AJAX system looks good and I will consider using this in the future - I
have already provided similiar functionality to this by using a webservice -
this works well and I am currently looking at this as an solution to this
specific problem.

The true problem I am dealing with is actually a little more critical then
this issue - as I have been trying to discuss on another thread for some-time
- The problem I mainly have is dealing with very large numbers of files.

The main issue I have is that I have over 10,000 files - most of which
represent invoices to clients - I have to keep the original copies of each
invoice and it is not practical to re-create the invoice each time it is
viewed by the client. Currently what I do is save these files else where and
when they are requested I copy them to a temp directory on the server and
redirect the customer to the page using response.redire ct.

The problem is the overhead of compiling these pages is huge - and because
there are so many there is no way to include them into the application. I
have also found that for each file that is compiled the memory increases.

Many of the files also needed to be ASPX as they have server-side logic
within them - this is used to provide a interactive charting in each invoice.

Most people have simply said that it is a bad design and I should start
again - but I can't see any other way of doing this.

What I wanted to know - is it possible to pre-compile a page somehow and
maybee save a copy of the pre-compiled class file. When the page is
requested I could copy accross a copy of this file along with the original -
when the system goes to access the file it would somehow recongize that it
has already been compiled and simply get on with processing the page. This
would mean I would need to save twice as many files - but I don't see this as
a major issue.

This solution would fix my speed issues - but does not provide an immediate
solution to the memory issue. but one thing at a time - is what I have
suggested possible????

And to extend this further - once a class has been defined - is it possible
to remove this definition - or does this definition remain available until
the process is next recycled?

--
matthew
"Karl Seguin" wrote:
Matthew:
Your process seems complicated. I don't know enough to say that there's a
better way to do everything, I merely state that to indicate how hard this
is going to be to fix things. ASP.Net will automatically recycle itself
after it just-in-time compiles X amount of pages. From what you describe,
it seems like every 5 seconds for every user a new page is created, forcing
ASP.Net to have to recompile it. I would suspect that you'd quickly run
into problems this way (however, I doubt that's, in any way, associated with
your memory problem). Just a comment of something you should be aware of.

You might want to build your entire reload/dynamic creation framework on a
much lighterweight protocol. Again, I don't fully understand what you are
doing, but it would seem AJAX might be able to help you here. This would
let you asynchronously send whatever data back to your original page
without having to reload or recreate new pages. You can learn more about
this from: http://ajax.schwarz-interactive.de/c...e/default.aspx

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"matvdl" <ma****@discuss ions.microsoft. com> wrote in message
news:36******** *************** ***********@mic rosoft.com...
I have migrated my asp application to asp.net some time ago - but I am
still
having some difficulties in understanding the best way to mange some
tasks.

I currently have a page that loads a aspx web page - this page is
continually refreshed - every 5 seconds or so. To do this I use the
download
behavior on the client to call a particular page - say newchart.aspx. The
newchart.aspx than calls a custom component (vb app on another machine
using
dcom) and this app goes and creates a chartXXX.aspx file in the temp
directory on the web server. newchart.aspx than calls this chart123.aspx
and
returns the result of this page back to the client. chartXXX.aspx is
unique
for every call.

On each call the memory on the server increases - until the point it
resets.
I used this method in asp extensively and never had these problems - but
the
changes in asp.net means that this is not be best way to do this.

Can anyone suggest to me a better way of managing something like this??

My custom app on the remote computer has the smarts of what needs to be
returned to the client and sometimes it simply writes a html page to the
temp
directory and this gets returned to the client - this causes no problem -
the
difficulty happens when a aspx file is written.
--
matthew


Nov 19 '05 #3
matvdl wrote:
Karl,

Thanks for the response - it was helpfull.

The AJAX system looks good and I will consider using this in the
future - I have already provided similiar functionality to this by
using a webservice - this works well and I am currently looking at
this as an solution to this specific problem.

The true problem I am dealing with is actually a little more critical
then this issue - as I have been trying to discuss on another thread
for some-time - The problem I mainly have is dealing with very large
numbers of files.

The main issue I have is that I have over 10,000 files - most of which
represent invoices to clients - I have to keep the original copies of
each invoice and it is not practical to re-create the invoice each
time it is viewed by the client. Currently what I do is save these
files else where and when they are requested I copy them to a temp
directory on the server and redirect the customer to the page using
response.redire ct.

The problem is the overhead of compiling these pages is huge - and
because there are so many there is no way to include them into the
application. I have also found that for each file that is compiled
the memory increases.

Many of the files also needed to be ASPX as they have server-side
logic within them - this is used to provide a interactive charting in
each invoice.

Most people have simply said that it is a bad design and I should
start again - but I can't see any other way of doing this.

What I wanted to know - is it possible to pre-compile a page somehow
and maybee save a copy of the pre-compiled class file. When the page
is requested I could copy accross a copy of this file along with the
original - when the system goes to access the file it would somehow
recongize that it has already been compiled and simply get on with
processing the page. This would mean I would need to save twice as
many files - but I don't see this as a major issue.

This solution would fix my speed issues - but does not provide an
immediate solution to the memory issue. but one thing at a time - is
what I have suggested possible????

And to extend this further - once a class has been defined - is it
possible to remove this definition - or does this definition remain
available until the process is next recycled?

One way you could investigate:
Don't store those invoices as aspx pages, complete with controls
for charting, but store only the data IN the invoices (as XML files,
maybe even in the database). Instead of redirecting to the (copied)
invoice-aspx file, use a standard aspx with a parameter to select the
invoice data. Then build you invoice, complete with charts, from
that data.

Hans Kesting

Matthew:
Your process seems complicated. I don't know enough to say that
there's a better way to do everything, I merely state that to
indicate how hard this is going to be to fix things. ASP.Net will
automatically recycle itself after it just-in-time compiles X amount
of pages. From what you describe, it seems like every 5 seconds
for every user a new page is created, forcing ASP.Net to have to
recompile it. I would suspect that you'd quickly run into problems
this way (however, I doubt that's, in any way, associated with your
memory problem). Just a comment of something you should be aware
of.

You might want to build your entire reload/dynamic creation
framework on a much lighterweight protocol. Again, I don't fully
understand what you are doing, but it would seem AJAX might be able
to help you here. This would let you asynchronously send whatever
data back to your original page without having to reload or recreate
new pages. You can learn more about this from:
http://ajax.schwarz-interactive.de/c...e/default.aspx

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying) http://www.openmymind.net/faq.aspx - unofficial newsgroup
FAQ (more to come!)
"matvdl" <ma****@discuss ions.microsoft. com> wrote in message
news:36******** *************** ***********@mic rosoft.com...
I have migrated my asp application to asp.net some time ago - but I
am still
having some difficulties in understanding the best way to mange some
tasks.

I currently have a page that loads a aspx web page - this page is
continually refreshed - every 5 seconds or so. To do this I use the
download
behavior on the client to call a particular page - say
newchart.aspx. The newchart.aspx than calls a custom component (vb
app on another machine using
dcom) and this app goes and creates a chartXXX.aspx file in the temp
directory on the web server. newchart.aspx than calls this
chart123.aspx and
returns the result of this page back to the client. chartXXX.aspx
is unique
for every call.

On each call the memory on the server increases - until the point it
resets.
I used this method in asp extensively and never had these problems
- but the
changes in asp.net means that this is not be best way to do this.

Can anyone suggest to me a better way of managing something like
this??

My custom app on the remote computer has the smarts of what needs
to be returned to the client and sometimes it simply writes a html
page to the temp
directory and this gets returned to the client - this causes no
problem - the
difficulty happens when a aspx file is written.
--
matthew

Nov 19 '05 #4
I'm not sure if what I'm about to suggest would meet your company's
apparently very strict rules but, instead of saving original code as
aspx pages in case you have to retrieve the same information again,
wouldn't it be a lot simpler to have a dynamic page ( aspx ) which
creates the invoices you need, and publish the resulting invoices to
PDF files, which you could then classify/retrieve at will ?

That would eliminate your excessive aspx files problem,
while still meeting the requirement that the original invoices be saved.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
=============== =======

"matvdl" <ma****@discuss ions.microsoft. com> wrote in message
news:FC******** *************** ***********@mic rosoft.com...
Karl,

Thanks for the response - it was helpfull.

The AJAX system looks good and I will consider using this in the future - I
have already provided similiar functionality to this by using a webservice -
this works well and I am currently looking at this as an solution to this
specific problem.

The true problem I am dealing with is actually a little more critical then
this issue - as I have been trying to discuss on another thread for some-time
- The problem I mainly have is dealing with very large numbers of files.

The main issue I have is that I have over 10,000 files - most of which
represent invoices to clients - I have to keep the original copies of each
invoice and it is not practical to re-create the invoice each time it is
viewed by the client. Currently what I do is save these files else where and
when they are requested I copy them to a temp directory on the server and
redirect the customer to the page using response.redire ct.

The problem is the overhead of compiling these pages is huge - and because
there are so many there is no way to include them into the application. I
have also found that for each file that is compiled the memory increases.

Many of the files also needed to be ASPX as they have server-side logic
within them - this is used to provide a interactive charting in each invoice.

Most people have simply said that it is a bad design and I should start
again - but I can't see any other way of doing this.

What I wanted to know - is it possible to pre-compile a page somehow and
maybee save a copy of the pre-compiled class file. When the page is
requested I could copy accross a copy of this file along with the original -
when the system goes to access the file it would somehow recongize that it
has already been compiled and simply get on with processing the page. This
would mean I would need to save twice as many files - but I don't see this as
a major issue.

This solution would fix my speed issues - but does not provide an immediate
solution to the memory issue. but one thing at a time - is what I have
suggested possible????

And to extend this further - once a class has been defined - is it possible
to remove this definition - or does this definition remain available until
the process is next recycled?

--
matthew
"Karl Seguin" wrote:
Matthew:
Your process seems complicated. I don't know enough to say that there's a
better way to do everything, I merely state that to indicate how hard this
is going to be to fix things. ASP.Net will automatically recycle itself
after it just-in-time compiles X amount of pages. From what you describe,
it seems like every 5 seconds for every user a new page is created, forcing
ASP.Net to have to recompile it. I would suspect that you'd quickly run
into problems this way (however, I doubt that's, in any way, associated with
your memory problem). Just a comment of something you should be aware of.

You might want to build your entire reload/dynamic creation framework on a
much lighterweight protocol. Again, I don't fully understand what you are
doing, but it would seem AJAX might be able to help you here. This would
let you asynchronously send whatever data back to your original page
without having to reload or recreate new pages. You can learn more about
this from: http://ajax.schwarz-interactive.de/c...e/default.aspx

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"matvdl" <ma****@discuss ions.microsoft. com> wrote in message
news:36******** *************** ***********@mic rosoft.com...
>I have migrated my asp application to asp.net some time ago - but I am
>still
> having some difficulties in understanding the best way to mange some
> tasks.
>
> I currently have a page that loads a aspx web page - this page is
> continually refreshed - every 5 seconds or so. To do this I use the
> download
> behavior on the client to call a particular page - say newchart.aspx. The
> newchart.aspx than calls a custom component (vb app on another machine
> using
> dcom) and this app goes and creates a chartXXX.aspx file in the temp
> directory on the web server. newchart.aspx than calls this chart123.aspx
> and
> returns the result of this page back to the client. chartXXX.aspx is
> unique
> for every call.
>
> On each call the memory on the server increases - until the point it
> resets.
> I used this method in asp extensively and never had these problems - but
> the
> changes in asp.net means that this is not be best way to do this.
>
> Can anyone suggest to me a better way of managing something like this??
>
> My custom app on the remote computer has the smarts of what needs to be
> returned to the client and sometimes it simply writes a html page to the
> temp
> directory and this gets returned to the client - this causes no problem -
> the
> difficulty happens when a aspx file is written.
>
>
> --
> matthew


Nov 19 '05 #5
Both Hans and Juan make the same suggestion I would have. Store the data
(database, xml, ...) and simply have an invoice.aspx which takes an
?invoiceId=xxx and dynamically generates the invoice.. That's certainly
the more "traditiona l" way of doing thing.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:OE******** ******@TK2MSFTN GP15.phx.gbl...
I'm not sure if what I'm about to suggest would meet your company's
apparently very strict rules but, instead of saving original code as
aspx pages in case you have to retrieve the same information again,
wouldn't it be a lot simpler to have a dynamic page ( aspx ) which
creates the invoices you need, and publish the resulting invoices to
PDF files, which you could then classify/retrieve at will ?

That would eliminate your excessive aspx files problem,
while still meeting the requirement that the original invoices be saved.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
=============== =======

"matvdl" <ma****@discuss ions.microsoft. com> wrote in message
news:FC******** *************** ***********@mic rosoft.com...
Karl,

Thanks for the response - it was helpfull.

The AJAX system looks good and I will consider using this in the future -
I
have already provided similiar functionality to this by using a
webservice -
this works well and I am currently looking at this as an solution to this
specific problem.

The true problem I am dealing with is actually a little more critical
then
this issue - as I have been trying to discuss on another thread for
some-time
- The problem I mainly have is dealing with very large numbers of files.

The main issue I have is that I have over 10,000 files - most of which
represent invoices to clients - I have to keep the original copies of
each
invoice and it is not practical to re-create the invoice each time it is
viewed by the client. Currently what I do is save these files else where
and
when they are requested I copy them to a temp directory on the server and
redirect the customer to the page using response.redire ct.

The problem is the overhead of compiling these pages is huge - and
because
there are so many there is no way to include them into the application.
I
have also found that for each file that is compiled the memory increases.

Many of the files also needed to be ASPX as they have server-side logic
within them - this is used to provide a interactive charting in each
invoice.

Most people have simply said that it is a bad design and I should start
again - but I can't see any other way of doing this.

What I wanted to know - is it possible to pre-compile a page somehow and
maybee save a copy of the pre-compiled class file. When the page is
requested I could copy accross a copy of this file along with the
original -
when the system goes to access the file it would somehow recongize that
it
has already been compiled and simply get on with processing the page.
This
would mean I would need to save twice as many files - but I don't see
this as
a major issue.

This solution would fix my speed issues - but does not provide an
immediate
solution to the memory issue. but one thing at a time - is what I have
suggested possible????

And to extend this further - once a class has been defined - is it
possible
to remove this definition - or does this definition remain available
until
the process is next recycled?

--
matthew
"Karl Seguin" wrote:
Matthew:
Your process seems complicated. I don't know enough to say that there's
a
better way to do everything, I merely state that to indicate how hard
this
is going to be to fix things. ASP.Net will automatically recycle itself
after it just-in-time compiles X amount of pages. From what you
describe,
it seems like every 5 seconds for every user a new page is created,
forcing
ASP.Net to have to recompile it. I would suspect that you'd quickly run
into problems this way (however, I doubt that's, in any way, associated
with
your memory problem). Just a comment of something you should be aware
of.

You might want to build your entire reload/dynamic creation framework on
a
much lighterweight protocol. Again, I don't fully understand what you
are
doing, but it would seem AJAX might be able to help you here. This
would
let you asynchronously send whatever data back to your original page
without having to reload or recreate new pages. You can learn more
about
this from: http://ajax.schwarz-interactive.de/c...e/default.aspx

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"matvdl" <ma****@discuss ions.microsoft. com> wrote in message
news:36******** *************** ***********@mic rosoft.com...
>I have migrated my asp application to asp.net some time ago - but I am
>still
> having some difficulties in understanding the best way to mange some
> tasks.
>
> I currently have a page that loads a aspx web page - this page is
> continually refreshed - every 5 seconds or so. To do this I use the
> download
> behavior on the client to call a particular page - say newchart.aspx.
> The
> newchart.aspx than calls a custom component (vb app on another machine
> using
> dcom) and this app goes and creates a chartXXX.aspx file in the temp
> directory on the web server. newchart.aspx than calls this
> chart123.aspx
> and
> returns the result of this page back to the client. chartXXX.aspx is
> unique
> for every call.
>
> On each call the memory on the server increases - until the point it
> resets.
> I used this method in asp extensively and never had these problems -
> but
> the
> changes in asp.net means that this is not be best way to do this.
>
> Can anyone suggest to me a better way of managing something like
> this??
>
> My custom app on the remote computer has the smarts of what needs to
> be
> returned to the client and sometimes it simply writes a html page to
> the
> temp
> directory and this gets returned to the client - this causes no
> problem -
> the
> difficulty happens when a aspx file is written.
>
>
> --
> matthew


Nov 19 '05 #6
You can look at:
http://www.dotnet247.com/247referenc.../18/92782.aspx

Ken Cox suggest that it's possible to do it via vbc or csc (vb compiler, c#
compiler) command line. I would agree with him that it's possible, but I
don't know how.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"matvdl" <ma****@discuss ions.microsoft. com> wrote in message
news:FC******** *************** ***********@mic rosoft.com...
Karl,

Thanks for the response - it was helpfull.

The AJAX system looks good and I will consider using this in the future -
I
have already provided similiar functionality to this by using a
webservice -
this works well and I am currently looking at this as an solution to this
specific problem.

The true problem I am dealing with is actually a little more critical then
this issue - as I have been trying to discuss on another thread for
some-time
- The problem I mainly have is dealing with very large numbers of files.

The main issue I have is that I have over 10,000 files - most of which
represent invoices to clients - I have to keep the original copies of each
invoice and it is not practical to re-create the invoice each time it is
viewed by the client. Currently what I do is save these files else where
and
when they are requested I copy them to a temp directory on the server and
redirect the customer to the page using response.redire ct.

The problem is the overhead of compiling these pages is huge - and because
there are so many there is no way to include them into the application. I
have also found that for each file that is compiled the memory increases.

Many of the files also needed to be ASPX as they have server-side logic
within them - this is used to provide a interactive charting in each
invoice.

Most people have simply said that it is a bad design and I should start
again - but I can't see any other way of doing this.

What I wanted to know - is it possible to pre-compile a page somehow and
maybee save a copy of the pre-compiled class file. When the page is
requested I could copy accross a copy of this file along with the
original -
when the system goes to access the file it would somehow recongize that it
has already been compiled and simply get on with processing the page.
This
would mean I would need to save twice as many files - but I don't see this
as
a major issue.

This solution would fix my speed issues - but does not provide an
immediate
solution to the memory issue. but one thing at a time - is what I have
suggested possible????

And to extend this further - once a class has been defined - is it
possible
to remove this definition - or does this definition remain available until
the process is next recycled?

--
matthew
"Karl Seguin" wrote:
Matthew:
Your process seems complicated. I don't know enough to say that there's
a
better way to do everything, I merely state that to indicate how hard
this
is going to be to fix things. ASP.Net will automatically recycle itself
after it just-in-time compiles X amount of pages. From what you
describe,
it seems like every 5 seconds for every user a new page is created,
forcing
ASP.Net to have to recompile it. I would suspect that you'd quickly run
into problems this way (however, I doubt that's, in any way, associated
with
your memory problem). Just a comment of something you should be aware
of.

You might want to build your entire reload/dynamic creation framework on
a
much lighterweight protocol. Again, I don't fully understand what you are
doing, but it would seem AJAX might be able to help you here. This would
let you asynchronously send whatever data back to your original page
without having to reload or recreate new pages. You can learn more about
this from: http://ajax.schwarz-interactive.de/c...e/default.aspx

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"matvdl" <ma****@discuss ions.microsoft. com> wrote in message
news:36******** *************** ***********@mic rosoft.com...
>I have migrated my asp application to asp.net some time ago - but I am
>still
> having some difficulties in understanding the best way to mange some
> tasks.
>
> I currently have a page that loads a aspx web page - this page is
> continually refreshed - every 5 seconds or so. To do this I use the
> download
> behavior on the client to call a particular page - say newchart.aspx.
> The
> newchart.aspx than calls a custom component (vb app on another machine
> using
> dcom) and this app goes and creates a chartXXX.aspx file in the temp
> directory on the web server. newchart.aspx than calls this
> chart123.aspx
> and
> returns the result of this page back to the client. chartXXX.aspx is
> unique
> for every call.
>
> On each call the memory on the server increases - until the point it
> resets.
> I used this method in asp extensively and never had these problems -
> but
> the
> changes in asp.net means that this is not be best way to do this.
>
> Can anyone suggest to me a better way of managing something like this??
>
> My custom app on the remote computer has the smarts of what needs to be
> returned to the client and sometimes it simply writes a html page to
> the
> temp
> directory and this gets returned to the client - this causes no
> problem -
> the
> difficulty happens when a aspx file is written.
>
>
> --
> matthew


Nov 19 '05 #7
Hi,

The runtime compiling can work but it is more complex than necessary in a
ASP.Net app, maybe V2 will make it easier.

It sounds like you are not disposing of the DCOM call properly, so I would
focus on that.

Regards
Brucek

"Karl Seguin" wrote:
You can look at:
http://www.dotnet247.com/247referenc.../18/92782.aspx

Ken Cox suggest that it's possible to do it via vbc or csc (vb compiler, c#
compiler) command line. I would agree with him that it's possible, but I
don't know how.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"matvdl" <ma****@discuss ions.microsoft. com> wrote in message
news:FC******** *************** ***********@mic rosoft.com...
Karl,

Thanks for the response - it was helpfull.

The AJAX system looks good and I will consider using this in the future -
I
have already provided similiar functionality to this by using a
webservice -
this works well and I am currently looking at this as an solution to this
specific problem.

The true problem I am dealing with is actually a little more critical then
this issue - as I have been trying to discuss on another thread for
some-time
- The problem I mainly have is dealing with very large numbers of files.

The main issue I have is that I have over 10,000 files - most of which
represent invoices to clients - I have to keep the original copies of each
invoice and it is not practical to re-create the invoice each time it is
viewed by the client. Currently what I do is save these files else where
and
when they are requested I copy them to a temp directory on the server and
redirect the customer to the page using response.redire ct.

The problem is the overhead of compiling these pages is huge - and because
there are so many there is no way to include them into the application. I
have also found that for each file that is compiled the memory increases.

Many of the files also needed to be ASPX as they have server-side logic
within them - this is used to provide a interactive charting in each
invoice.

Most people have simply said that it is a bad design and I should start
again - but I can't see any other way of doing this.

What I wanted to know - is it possible to pre-compile a page somehow and
maybee save a copy of the pre-compiled class file. When the page is
requested I could copy accross a copy of this file along with the
original -
when the system goes to access the file it would somehow recongize that it
has already been compiled and simply get on with processing the page.
This
would mean I would need to save twice as many files - but I don't see this
as
a major issue.

This solution would fix my speed issues - but does not provide an
immediate
solution to the memory issue. but one thing at a time - is what I have
suggested possible????

And to extend this further - once a class has been defined - is it
possible
to remove this definition - or does this definition remain available until
the process is next recycled?

--
matthew
"Karl Seguin" wrote:
Matthew:
Your process seems complicated. I don't know enough to say that there's
a
better way to do everything, I merely state that to indicate how hard
this
is going to be to fix things. ASP.Net will automatically recycle itself
after it just-in-time compiles X amount of pages. From what you
describe,
it seems like every 5 seconds for every user a new page is created,
forcing
ASP.Net to have to recompile it. I would suspect that you'd quickly run
into problems this way (however, I doubt that's, in any way, associated
with
your memory problem). Just a comment of something you should be aware
of.

You might want to build your entire reload/dynamic creation framework on
a
much lighterweight protocol. Again, I don't fully understand what you are
doing, but it would seem AJAX might be able to help you here. This would
let you asynchronously send whatever data back to your original page
without having to reload or recreate new pages. You can learn more about
this from: http://ajax.schwarz-interactive.de/c...e/default.aspx

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"matvdl" <ma****@discuss ions.microsoft. com> wrote in message
news:36******** *************** ***********@mic rosoft.com...
>I have migrated my asp application to asp.net some time ago - but I am
>still
> having some difficulties in understanding the best way to mange some
> tasks.
>
> I currently have a page that loads a aspx web page - this page is
> continually refreshed - every 5 seconds or so. To do this I use the
> download
> behavior on the client to call a particular page - say newchart.aspx.
> The
> newchart.aspx than calls a custom component (vb app on another machine
> using
> dcom) and this app goes and creates a chartXXX.aspx file in the temp
> directory on the web server. newchart.aspx than calls this
> chart123.aspx
> and
> returns the result of this page back to the client. chartXXX.aspx is
> unique
> for every call.
>
> On each call the memory on the server increases - until the point it
> resets.
> I used this method in asp extensively and never had these problems -
> but
> the
> changes in asp.net means that this is not be best way to do this.
>
> Can anyone suggest to me a better way of managing something like this??
>
> My custom app on the remote computer has the smarts of what needs to be
> returned to the client and sometimes it simply writes a html page to
> the
> temp
> directory and this gets returned to the client - this causes no
> problem -
> the
> difficulty happens when a aspx file is written.
>
>
> --
> matthew


Nov 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3280
by: Tom | last post by:
We have a VERY simple .NET C# Form Application, that has about a 23MB Memory Footprint. It starts a window runs a process and does a regular expression. I have done a GC.Collect to make sure that, no memory is lying around. GC reports only 84k of allocations. Starting 5-10 of this apps is going to start taking a considerable amount of memory. Is there a way to reduce this? Tom
17
3874
by: ~Gee | last post by:
Hi Folks! Please see the program below: 1 #include<iostream> 2 #include<list> 3 #include <unistd.h> 4 using namespace std; 5 int main() 6 { 7 {
16
2896
by: Justin Lazanowski | last post by:
Cross posting this question on the recommendation of an I have a .NET application that I am developing in C# I am loading information in from a dataset, and then pushing the dataset to a grid, or other controls depending on the particular form. This application is setup with one MDI parent calling MDI children with the exception of one Modal form (the report viewer). When I run the application and run one of the screens that pulls...
6
3712
by: Ganesan selvaraj | last post by:
I using C# .net. i want to split the text files based of the some condition. my source text file size may be 4 kb to 4 gb. some time when i split the i got the "out of memory exception. when i read from the file i read the 10mb and split the this content and clear the buffer and read the second 10 mb and so on. How can i rectify the problem?
20
4252
by: Philip Carnstam | last post by:
How come .Net applications use so much memory? Every application I compile uses at least 10 MB of memory, even the ones consisting of only a form and nothing else. If I minimize them though the memory usage drops to a couple hundred KB. Why? Is there anything I should to to prevent this? I have compiled in release and deactivated all forms of debugging, I think! Thanks, Philip
5
3155
by: SDS | last post by:
I am writing an ASP.NET application (in C#) that, as part of a particular response, populates a MemoryStream object with binary data that is being collected from a Process object's StandardOutput. This data can be between 60MB and 100MB under normal circumstances. I write this data to the response stream. I'm noticing that calls to this particular page are causing W3WP to use upwards of 60MB. When W3WP starts up, its using around 24MB...
16
2397
by: JCauble | last post by:
We have a large Asp.net application that is currently crashing our production servers. What we are seeing is the aspnet_wp eat up a bunch of memory and then stop unexpectedly. Does not recycle. Example: After about 5 hours with a concurrent user base of about 150 users the application raises the aspnet_wp memory usage by almost 500MB. If our server guys modify the web.config this data is released and the workerprocess goes back to a...
3
2763
by: bamapookie | last post by:
I am new to VB, but not new to programming. I am using VB.Net 2003 and I have written a small app to monitor several running processes and everything is fine except the memory usage. When the app starts up, even though there is very little on the form, the memory usage displayed in task manager jumps to 24MB. If I minimize the app, usage drops to .6MB. If I then restore the app, it moves back up to 3-6MB. Here are a few details about...
3
2475
by: crazy420fingers | last post by:
I'm running a python program that simulates a wireless network protocol for a certain number of "frames" (measure of time). I've observed the following: 1. The memory consumption of the program grows as the number of frames I simulate increases. To verify this, I've used two methods, which I invoke after every frame simulated:
0
9702
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10607
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10665
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9444
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4498
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4080
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3139
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.