[Mono-devel-list] patch for TextWriter
Atsushi Eno
atsushi at ximian.com
Sun Dec 5 23:46:54 EST 2004
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/81d09c87/attachment.pl
More information about the Mono-devel-list
mailing list