DMD 1.038 and 2.022 releases

Denis Koroskin 2korden at gmail.com
Sat Dec 20 05:01:31 PST 2008


On Sat, 20 Dec 2008 15:39:08 +0300, Bill Baxter <wbaxter at gmail.com> wrote:

> On Sat, Dec 20, 2008 at 9:11 PM, Denis Koroskin <2korden at gmail.com>  
> wrote:
>> On Mon, 15 Dec 2008 10:58:23 +0300, Bill Baxter <wbaxter at gmail.com>  
>> wrote:
>>
>>> For me, V1.038 compiles my code but takes a really really really long
>>> time to do so.
>>>
>>> It now takes  1 min 20 secs for a full build, when it used to compile
>>> in 13 seconds.
>>> Forget the 60% slowdown from LDC -- this is 515% slower!
>>>
>>> (building with DSSS and tango)
>>>
>>> --bb
>>>
>>
>> I generally make all my imports private and run a command line tool that
>> strips unnecessary imports once in a while to minimize intermodular
>> dependencies. Maybe it could help in your case, too?
>>
>
> I'd love to have an unnecessary import finder tool.  How does that work?
>
> --bb

It's easy: remove an import and try if it still works :)
I recompile that file only and since all the imports are private, it  
generally doesn't break other files.

The only exception - templates. They aren't fully analyzed until  
instanciated and therefore some imports may be removed even if they are  
necessary. A simple tag prevents an import from removal:

private import std.algorithm; // force

Works about 3 minutes to remove all redundant imports from DWT.


More information about the Digitalmars-d-announce mailing list