[Mono-devel-list] patch for TextWriter
atsushi at ximian.com
Sun Dec 5 23:46:54 EST 2004
>>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.)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the Mono-devel-list