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

Paolo Molaro lupus at ximian.com
Tue Oct 31 14:32:32 EST 2006


[Not approving the 700KB mail message to the list, just replying to some
comments here]

On 10/31/06 Kornél Pál wrote:
> >Does the code properly dispose the file strem objects as sson as
> >tokenization is done?
> 
> http://svn.myrealbox.com/viewcvs/trunk/vbnc/vbnc/source/General/CodeFile.vb?rev=64447&view=markup
> 
> The entire file is read and then is stored as a string. (This was the same
> before my UTF-8 detection patch.)

It looks like the file is closed on finally, so that's good.
It seems also that the token list is kept just while a single file is
parsed, so that should not be too bad. What is worrying is that it seems
the list is also used as an array, with indexing by integer and this may
have a significant impact on performance.
gain, we can't tell for sure until someone provides a sample program as
requested.

> >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.
> 
> Is that a problem if the compilation cannot complete? Currently vbnc is able
> to finish the resolve phase on Mono when bootstrapping and fails in early
> define phase.

How much time does it take to complete the resolve phase? I thought that
was the issue given this thread subject. If there are other issues, they
should be discussed in another thread.
And yes, it is a problem if it makes the compiler so slow to be unusable
as you claim it is.

> You need Mono SVN HEAD. Microsoft.VisualBasic.dll can be used from Mono
> 1.1.18 installer. And you need the corlib/runtime patch in
> http://lists.ximian.com/pipermail/mono-devel-list/2006-October/021093.html
> in order to finish resolve phase.
> 
> After resolve phase I have no experience because it takes too long time to
> finish resolve and that makes quite impossible to debug the define phase on
> Mono.

This is why I requested a sample program that can compile, instead of
trying to profile a program that never finishes.
When someone posts that we can start to profile, so far nobody did,
I guess we have to wait for some vb programmers to show up.

lupus

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



More information about the Mono-devel-list mailing list