Memory leak in ASP.Net at each post back
-
Hello friends, I don't know why I have memory leak (on client browser, not the server) at each postback, even on pages that don't use any javascripts or 3rd party RAD controls (which often use leaky javascript!). Does anyone know why this happens?
Nila
-
Hello friends, I don't know why I have memory leak (on client browser, not the server) at each postback, even on pages that don't use any javascripts or 3rd party RAD controls (which often use leaky javascript!). Does anyone know why this happens?
Nila
Sounds like the viewstate is getting bigger and bigger. Try disabling the viewstate altogether, perform a few postbacks and see what happens to the memory then.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before. -
Hello friends, I don't know why I have memory leak (on client browser, not the server) at each postback, even on pages that don't use any javascripts or 3rd party RAD controls (which often use leaky javascript!). Does anyone know why this happens?
Nila
hi nila.. thank u very much... keep in touch
-
Sounds like the viewstate is getting bigger and bigger. Try disabling the viewstate altogether, perform a few postbacks and see what happens to the memory then.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.uhh... i H-A-T-E viewstate but it's just too convenient. Do you think it's a good idea to store the between-postback data in session instead? If so, would you suggest storing it on client or server?
Nila
-
uhh... i H-A-T-E viewstate but it's just too convenient. Do you think it's a good idea to store the between-postback data in session instead? If so, would you suggest storing it on client or server?
Nila
I would just assess what needs to be stored in the viewstate and then turn off anything that doesn't. Yes, it is convenient, and to be honest it is a huge time saver. Bear in mind that the "memory consumed" at the browser should be reclaimed whatever was used.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before. -
uhh... i H-A-T-E viewstate but it's just too convenient. Do you think it's a good idea to store the between-postback data in session instead? If so, would you suggest storing it on client or server?
Nila
Grapes-R-Fun wrote:
Do you think it's a good idea to store the between-postback data in session instead?
Remember that session state is stored on the server. If you have a site with 100's or 1000's of users, that can be a real drain (depending on how much you store) on the server and reduce the number of users you can serve. Also if you use a webfarm it becomes much more challenging using session state this way.
only two letters away from being an asset
-
Grapes-R-Fun wrote:
Do you think it's a good idea to store the between-postback data in session instead?
Remember that session state is stored on the server. If you have a site with 100's or 1000's of users, that can be a real drain (depending on how much you store) on the server and reduce the number of users you can serve. Also if you use a webfarm it becomes much more challenging using session state this way.
only two letters away from being an asset
Silly me, I must have confused the session with cache :-O During the most severe case, at most I will have 400 people using it, and I have only one virtualized server (that's another 'uhhh' story) to dish out this app. Now when Im done with a variable that is stored in session, if I set its value to null will the space be conserved, or do I pretty much have to abandon/timeout session all together?
Nila
-
Silly me, I must have confused the session with cache :-O During the most severe case, at most I will have 400 people using it, and I have only one virtualized server (that's another 'uhhh' story) to dish out this app. Now when Im done with a variable that is stored in session, if I set its value to null will the space be conserved, or do I pretty much have to abandon/timeout session all together?
Nila
The memory isn't really going to be recovered until the GC gets around to it. Although it doesn't seem as though your app would have any difficulties if you limited what you were storing. Keep in mind that IIS will scavange memory when needed, so you may lose session state from whatever sessions it determines are no longer in use, even if they are.
only two letters away from being an asset
-
The memory isn't really going to be recovered until the GC gets around to it. Although it doesn't seem as though your app would have any difficulties if you limited what you were storing. Keep in mind that IIS will scavange memory when needed, so you may lose session state from whatever sessions it determines are no longer in use, even if they are.
only two letters away from being an asset
Thanks a bunch Mark!! I really like your signature, btw - it's so witty :-)
Nila