[Mono-dev] Why do we need separate I18N assemblies?
Miguel de Icaza
miguel at ximian.com
Sat Jul 1 12:24:43 EDT 2006
> I think it would be worth it to try to remove the reflection overhead,
> because it is not just taking some time but also quite some amount of
> additional memory. Personally I would recommend to put the small encodings
> directly into corelib and the larger and seldom used ones in one or more
> additional assemblies that could be referenced without reflection and simply
> be deleted when not needed.
As you point out in one of your emails, I think it is worth fixing the
code that triggers the culture-dependent string compares in our class
libraries, they are likely not needed.
As for not using reflection, am afraid that even if we removed the use
of Reflection for the encodings, reflection will end up being triggered
anyways as too much code in Mono (in addition to standard .NET
practices) will trigger the reflection bits to be loaded.
Integrating the most commonly used encodings into corlib sounds like a
good idea, someone would have to prototype it and measure it.
> The overhead actually comes mostly from two places:
> a) I18N
> b) Globalisation
> b is triggered because of String handling mistakes within corelib, however
> the biggest share in runtime is I18N (see textfile - 78 ms out of 93 ms
> total app time).
Thanks for looking at the problematic sources. I like the idea of
fixing these issues, but am not sure that they will have a real effect
The globalization code will likely be used shortly after, at least for
any non-trivial program.
More information about the Mono-devel-list