[Mono-dev] VBNC uses too much CPU and RAM on Mono
Kornél Pál
kornelpal at gmail.com
Sun Oct 29 17:36:46 EST 2006
Hi,
Thanks for your tip regarding the GC, I've added a new thread to the
compiler that does:
Do
Thread.Sleep(10000)
mainThread.Suspend()
GC.Collect()
GC.WaitForPendingFinalizers()
' ... 10 times
mainThread.Resume()
Loop
And it "Finished Resolve" and is "Starting Define".
But then I got the exception:
Unhandled Exception: System.TypeLoadException: A type load exception has
occurred.
at System.Type.MakeGenericType (System.Type[] types) [0x0005a] in
...\mcs\class\corlib\System\Type.cs:1159
at vbnc.GenericTypeDescriptor.get_TypeInReflection () [0x000ba] in
...\vbnc\vbnc\source\Descriptors\GenericTypeDescriptor.vb:134
I'll probably be able to fix that one as well, but my very-very big problem
is that vbnc is so undarebly slow on Mono that it's quite impossible to wait
for the compiler to reach again the stage where it's failing.
If the results of previous stages could be "serialized" it could save a lot
of time and the actual stage could be debugged.
Any help on speeding up vbnc is welcome.
Kornél
----- Original Message -----
From: "Ben Maurer" <bmaurer at ximian.com>
To: "Kornél Pál" <kornelpal at gmail.com>
Cc: <mono-devel-list at lists.ximian.com>
Sent: Sunday, October 29, 2006 8:44 PM
Subject: Re: [Mono-dev] VBNC uses too much CPU and RAM on Mono
Hey,
Even after the patches I suggested to Rolf, VBNC had a heap size of ~100mb
on MSFT. I'm a bit suprised Mono is having so much trouble. It's quite
possible this is a GC issue. The compiler stores a very large linked list
of all tokens in the program. With a non-generational gc, we may be having
very bad performance from walking the heap so much.
You might try aborting before the resolve phase, to see if you can
--profile before that point on Mono. Also, it's worth using profilers on
MSFT's runtime (most commercial ones have demos, that's always worked for
me).
Sadly, I'm not going to have time to take a look at this for quite a while.
-b
>
> I was using SVN HEAD.
>
> Please try the previously referenced patch, maybe you will be able to find
> out something more. The compiler don't seem to have endless recursions or
> loops but I may be wrong. Other than this problem I have no other idea,
> because it's running, but is slow and eats memory.
>
> Kornél
>
> ----- Original Message -----
> From: "Rolf Bjarne Kvinge" <rolflists at ya.com>
> To: "Kornél Pál" <kornelpal at gmail.com>; <mono-devel-list at lists.ximian.com>
> Sent: Sunday, October 29, 2006 7:37 PM
> Subject: Re: [Mono-dev] VBNC uses too much CPU and RAM on Mono
>
>
>> Hello,
>>
>> Are you using latest svn for vbnc? A few optimization was committed this
>> week so it should be faster. If it is running out of memory though I
>> think
>> there might some other problem optimizations won't resolve.
>>
>> Rolf
>>
>> On Sun, 29 Oct 2006 19:21:07 +0100, Kornél Pál <kornelpal at gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> Using the patch in
>>> http://lists.ximian.com/pipermail/mono-devel-list/2006-October/021093.html
>>> no exception ocurred in vbnc but I wasn't able to finish the resolve
>>> phase
>>> because it runs out of memory. The machine I used has 1 GB RAM and is
>>> running Windows XP. And I think such a machine should be able to run a
>>> VB
>>> compiler. Note that running the same binary on MS.NET is much faster
>>> and
>>> requires much less memory.
>>>
>>> If you have any idea making VBNC's footprint smaller please let me
>>> know.
>>>
>>> Kornél
>>>
>>> _______________________________________________
>>> Mono-devel-list mailing list
>>> Mono-devel-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>>
>>
>>
>>
>> --
>> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
More information about the Mono-devel-list
mailing list