[Mono-list] Profiling web app to find where memory is going

Atsushi Eno atsushi at ximian.com
Thu Jan 12 04:14:48 EST 2006

Hi Joshua,

> I can see now that a single page load is resulting in the creation of 
> 100,000 new string instances.  Seems like a lot, but maybe it's just par 
> for the course.  So now I have a new problem: I can see tons of strings 
> are being allocated by I18N.Common.ByteEncoding:GetString() and 
> MySql.Data.MySqlClient.MySqlDataReader:GetOrdinal(), but I don't know if 
> they're not being deallocated promptly, and I can't imagine tracing 
> through the code to see if the strings are hanging around unnecessarily 
> either within MySql.Data or higher up.

Sorry it is kind of quick question (am not reading all of this thread)
but is that ByteEncoding related allocation a problem in ByteEncoding
or in whatever calls ByteEncoding.GetString() ? It of course allocates
a string per call. If the number of allocation is equivalent to the
number of calls, then it is rather caller side matter.

(If something need to convert bytes to chars like a sport, GetBytes()
could be used instead).

Atsushi Eno

More information about the Mono-list mailing list