[Mono-bugs] [Bug 512790] New: Very slow creating of objects which contain the static readonly fields (only under Mono >= 2.2)

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jun 12 14:34:56 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=512790


           Summary: Very slow creating of objects which contain the static
                    readonly fields (only under Mono >= 2.2)
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: Yury at serdyuk.botik.ru
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=297898)
 --> (http://bugzilla.novell.com/attachment.cgi?id=297898)
ReadOnlyObjectTest.cs

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2)
Gecko/20040804 Netscape/7.2 (ax)

Creating of objects which contain the static readonly fields is in 20-100
slower 
under recent Mono versions (>= 2.2).
For example (see the attached file):

a) under Mono 2.4
$ mono -V
Mono JIT compiler version 2.4 (tarball Wed Apr  8 12:25:59 MSD 2009)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
        TLS:           __thread
        GC:            Included Boehm (with typed GC)
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  x86
        Disabled:      none

$ mono ReadOnlyObjectTest.exe
Pass 2 creation time : 1.911462 secs.

b) under Mono 2.0
$ ~/m-2.0/bin/mono ReadOnlyObjectTest.exe
Pass 2 creation time : 0.100511 secs.

In given case, the difference is 20 times,
but in big programs a difference reaches 50 times and more, for example,

$ mono compiler.exe
Pass 2 Parser creation time : 13.46612 secs.

$ ~/m-2.0/bin/mono compiler.exe
Pass 2 Parser creation time : 0.209606 secs.


Reproducible: Always

Steps to Reproduce:
1. Compile the attached file as
>gmcs ReadOnlyObjectTest.cs

2. Run under Mono 2.2 or 2.4 as
> mono ReadOnlyObjectTest.exe

3. Run under Mono 2.0 as
> mono ReadOnlyObjectTest.exe

and compare the times.

Actual Results:  
$ mono ReadOnlyObjectTest.exe
Pass 2 creation time : 1.911462 secs.

Expected Results:  
$ mono ReadOnlyObjectTest.exe
Pass 2 creation time : 0.100511 secs.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list