[Mono-dev] Cecil improvement
Rolf Bjarne Kvinge
rolflists at ya.com
Tue Aug 21 11:37:35 EDT 2007
> -----Original Message-----
> From: mono-devel-list-bounces at lists.ximian.com [mailto:mono-devel-list-
> bounces at lists.ximian.com] On Behalf Of Jb Evain
> Sent: martes, 21 de agosto de 2007 17:08
> To: Roei Erez
> Cc: mono-devel-list at lists.ximian.com
> Subject: Re: [Mono-dev] Cecil improvement
> On 8/21/07, Roei Erez <roeie at mainsoft.com> wrote:
> > Hi all,
> > As you may know we, at mainsoft, use cecil library.
> > We have made some analysis for the performance and found that loading
> > assemblies with cecil has a lot of memory consuming impact.
> > Investigating this thing more had shown that the code creates a full
> > model on top of the assembly row tables.
> > We understand that for writing/creating assembly using cecil ,
> building a
> > full object model might be unavoidable, but for a lot of users that
> > wants to read an assembly, and event interested only in part of the
> > it might be not necessary.
> > We believe that improving this area will give theses users a better
> > experience that will be realized in less memory consumption and
> > loading time.
> > Nowadays, we are looking for ways to improve cecil in this area.
> > I will be happy to know what you think, and whether you have had
> > about this issue.
> > Any thoughts, suggestions and questions are welcome.
> I'm also interested in improving Cecil's memory usage, and assembly
> load time, as it affects basically every user.
> The easier way I can think of right now, to save some memory, is to
> discard the Cecil's representation of the table heap after an assembly
> is loaded, as it is not need afterwards. But that won't improve the
> load time.
> A real and full optimization would be to read Cecil's higher level
> object model straight from the raw bytes. But that requires quite a
> big amount of work. And extra work to keep the assembly writing part
Maybe an option to load an assembly read-only would make sense, as well as
an option to not load anything until requested (a compiler for instance,
would only need the names of all the types when loading the assembly, no
need to load type members until the type is actually referenced in code
> There's also a few people using only the Mono.Cecil.Binary part, to
> only read the PE file. So there are quite a few things to take into
> consideration before doing anything.
> Jb Evain <jb at nurv.fr>
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.484 / Virus Database: 269.12.1/963 - Release Date:
> 20/08/2007 17:44
More information about the Mono-devel-list