[Mono-devel-list] patch for TextWriter

Atsushi Eno atsushi at ximian.com
Mon Dec 6 00:14:12 EST 2004


Oops, the previous patch was useless. Please take this one.

Atsushi Eno

Atsushi Eno wrote:
> Hi,
> 
> 
>>>I attached a patch for TextWriter.cs not to create a new string for
>>>every call to NewLine. If no problem, I'll check in later. One concern
>>>I have is that it costs one string field (which might be extraneous
>>>for some kind of use.)
>>
>>
>>`CoreNewLine' could be modified by someone, since it is protected. So,
>>it is invalid to cache it.
> 
> 
> Oh, good catch. Then, how about having a cache for CoreNewLine that
> is set everytime we set string cache? I attached another patch.
> 
> (Actually is matters where TextWriter.NewLine is referenced, so the
> performance problem still lies.)
> 
> Atsushi Eno
> 
> 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: textwriter.diff
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20041206/b36e2863/attachment.pl 


More information about the Mono-devel-list mailing list