Wednesday, 15 September 2010

c# - Analyzing why more number of string objects are held up in the memory while profiling my application -



c# - Analyzing why more number of string objects are held up in the memory while profiling my application -

i have been profiling application high cpu issue(cpu clocking around 80% during load test). 1 of feed got ms back upwards team total gc has been running every 2seconds , cpu intensive , mentioned there many string objects beingness created. hence, have been profiling application using ants profiler , see html markup dynamically rendering in custom web command beingness held in memory(shown ants profiler). if string dynamically binding button onclick event beingness held onto memory.

e.g:

protected void page_load(object sender, eventargs e) { button1.attributes.add("onclick", "return validatetheworksheet('default');"); }

in above code, ants profiler shows string "return validatetheworksheet('default');" held onto memory after page rendered.

ants profiler back upwards says every memory snapshot total gc collection. why string coming in memory?

any advise helpful...

thanks

the issue has been resolved. found 1 of dependent team's reusable code, had linq query , within linq query doing string comparing using toupper , trim function.

as, in loop entire list, piece of logic cpu expensive.

thanks

c# asp.net vb.net

No comments:

Post a Comment