[Mono-dev] VBNC uses too much CPU and RAM on Mono

Paolo Molaro lupus at ximian.com
Tue Oct 31 11:03:08 EST 2006


On 10/31/06 Miguel de Icaza wrote:
> > > Any help on speeding up vbnc is welcome.
> 
> Ben got the impression that VBNC was keeping a linked list of all the
> tokens after the tokenization phase (which is brutal on the GC as it
> becomes a large link-list walk).

While that is clearly a very inefficient way to do things, we can't say
it is the issue that is making vbnc unusable especially in mono.
First, it depends if the tokens are kept for the whole source or just
one file at a time: in the latter case it should not be so bad, since
the vbnc compiler is spread over hundreds of tiny files, so the actual
memory usage should be limited. Besides a non-moving GC can be faster at
handling such long lists than a moving one (one of my long-linked-list stress
tests for the new GC runs about two times slower on the jvm gc and about 30%
slower on the mono sgen GC vs the Boehm GC).
It may be more of an issue that the source is spread in so many files.
Does the code properly dispose the file strem objects as sson as
tokenization is done?

Anyway, it would be better to have the binaries and sample programs so
that we can actually profile on linux and see where time is actually
spent instead of guessing. The token list might be a problem, but it
might also be a tiny part of the whole picture.

lupus

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



More information about the Mono-devel-list mailing list