Thread overview
[Issue 6771] New: Jagged array and init causing DMD to take a LONG time to compile.
Oct 05, 2011
Damian
Feb 01, 2012
yebblies
Mar 12, 2013
Damian
Mar 12, 2013
Martin Nowak
October 05, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6771

           Summary: Jagged array and init causing DMD to take a LONG time
                    to compile.
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: damianday@hotmail.co.uk


--- Comment #0 from Damian <damianday@hotmail.co.uk> 2011-10-05 07:37:37 PDT ---
const MAXX = 40;
const MAXY = 40;

struct MyStruct
{
   ushort Var1;
   ushort Var2;
   ushort Var3;
   // NOTE: comment out these variables below and it
   // will compile faster..
   ubyte Var4;
   ubyte Var5;
   ubyte Var6;
   ubyte Var7;
   ubyte Var8;
   ubyte Var9;
}

public class MyClass
{
   public MyStruct[MAXX * 3][MAXY * 3] MArr;

   public this()
   {
      MArr = MArr.init; // <-- THIS LINE
   }
}

The above source code will cause the DMD compiler to take a long time to compile (minutes? hours?). Commenting out the lines suggested will speed the compilation up enough to see it succeed.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 01, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6771


yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies@gmail.com
           Platform|x86_64                      |All
         Resolution|                            |DUPLICATE
         OS/Version|Windows                     |All


--- Comment #1 from yebblies <yebblies@gmail.com> 2012-02-02 01:26:21 EST ---
*** This issue has been marked as a duplicate of issue 2396 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 12, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=6771



--- Comment #2 from Damian <damianday@hotmail.co.uk> 2013-03-12 10:59:57 PDT ---
*** This issue has been marked as a duplicate of issue 8828 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 12, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=6771


Martin Nowak <code@dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code@dawg.eu


--- Comment #3 from Martin Nowak <code@dawg.eu> 2013-03-12 12:21:56 PDT ---
*** This issue has been marked as a duplicate of issue 2396 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------