[Mono-dev] set culture uses serialization?

Paolo Molaro lupus at ximian.com
Mon Jan 7 10:08:14 EST 2008


On 01/06/08 Robert Jordan wrote:
> Robert Jordan wrote:
> > Since the current handling of CurrentThread.CultureInfo
> > isn't quite perfect (changes of CurrentThread.CultureInfo's
> > object state isn't reflected back into another app domains,
> > like on MS.NET), I wonder why we don't use a more efficient way:
> > cache the LCID instead of the full blown binary representation
> > of the CultureInfo.
> 
> Hmm, this is too restrictive, as it would miss changes
> of the CurrentThread.DateTimeFormat & CurrentThread.NumberFormat
> objects, but it could be still used as an optimization for the
> case that those objects were not changed. This should be the
> most probable case anyways.

We could see if it's possible to delay the serialization at the
appdomain switch time, so setting the culture would be cheap
(switching appdomain would be more costly, though).
Someone needs to write more extensive tests and check if this
matches the semantics of .net.

lupus

-- 
-----------------------------------------------------------------
lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better



More information about the Mono-devel-list mailing list