[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fri, 14 Feb 2003 16:44:15 +1000
I've been working on improving the metadata library in "pnet/image" this week.
Mainly to reduce the amount of memory that is needed to load libraries such
I've managed to chop about 80k off the file size of "mscorlib.dll" by removing
unnecessary parameter definition tokens. And I've chopped about 300k off the
initial size of the ILImage structure in memory, mostly by being cleverer
about what tokens I load initially - e.g. constants and local variable
signatures don't need to be loaded until they are actually referenced.
The memory size will increase a little bit as the application executes,
because additional tokens will be loaded on-demand. e.g. when a method is
executed, the local variable signature token for that method is loaded.
The biggest area of work that is outstanding is on-demand loading of types,
methods, fields, events, and properties. Currently, they are all loaded at
startup time, even those that are never used. Memory usage should decrease
substantially again once this is done.
Currently, "mscorlib.dll" uses about 900k to mmap the assembly into memory,
and another 900k to build the initial metadata structures at load time. We
can't do much about the former (it is set by the size of the file), but we
should be able to reduce the latter quite a bit more.
Given that pnet's loader was very fast to begin with, you probably won't
notice much difference in startup and compile times, but they should be
|[Prev in Thread]
||[Next in Thread]|
- [DotGNU]Metadata improvements,
Rhys Weatherley <=