[Mono-devel-list] Strange performance drop with svn code lately

Zoltan Varga vargaz at gmail.com
Tue Dec 14 17:36:03 EST 2004


                                       Hi,

  I understand that the current code is not very good performance
wise, but creating a
fast and still correct implementation is hard IMHO. When the culture
is changed, all
cached copies must be invalidated. Currently, only one cached instance
is kept in the
thread object itself, so invalidating it is easy. With multiple
copies, invalidating it is much
harder. Also, if an appdomain is unloaded, all cached instances which
live in the given
appdomain must be invalidated. So its not that simple as creating a
[ThreadStatic] variable
somewhere. I will try to work something out, through.

               Zoltan

On Tue, 14 Dec 2004 11:08:17 -0500 (EST), Ben Maurer <bmaurer at ximian.com> wrote:
> >                     Hi,
> >
> >>
> >> THe fix that zoltan checked in a bit ago should fix things. Try
> >> updating to head actually.
> >>
> >> -- Ben
> >>
> >
> >  I'm not sure about that. If an application makes calls to
> > CurrentCulture from
> > different appdomains, the culture will allways be deserialized on each
> > call even with the current code.
> 
> With r37747, you don't serialize the culture if it is the default one,
> right? So, if you switch app domains, it should just create a new culture.
> 
> The one problem with this is that you create the culture EVERY time you
> switch appdomains. The best way to handle this might be a
> per-thread-per-appdomain cache. This type of thing is provided by
> [ThreadStatic]. With [ThreadStatic], we could even avoid an unmanaged
> transition on NPTL. (I have a patch that does this sitting around at
> home...)
> 
> -- Ben
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>



More information about the Mono-devel-list mailing list