Re: Huge increase in UT compile time

2017-10-14 Thread Saurabh Das via Digitalmars-d-learn

On Saturday, 14 October 2017 at 09:03:05 UTC, Joakim wrote:

On Saturday, 14 October 2017 at 04:36:25 UTC, Saurabh Das wrote:

[...]


I can reproduce on linux/x64, looks like a memory leak, as dmd 
balloons out to eat up all available memory until it's killed.  
I see it with this minimal command passed to dmd 2.075.1, but 
not the 2.074.1 frontend, as reported:


./dmd2/linux/bin64/dmd -c -o- foo.d -unittest -deps=foo.deps

The closest issue I was able to find in bugzilla is this one, 
but that says it goes away with -o-, not the case here:


https://issues.dlang.org/show_bug.cgi?id=17601

I suggest one of you file a bug with the minimal command, 
noting that it goes away if -unittest or -deps is not passed.  
Make sure you mark it as a regression, just like the above bug, 
as Walter pays special attention to those.


Filed a bug report: https://issues.dlang.org/show_bug.cgi?id=17898

Hope I didn't miss anything.


Re: Huge increase in UT compile time

2017-10-14 Thread Joakim via Digitalmars-d-learn

On Saturday, 14 October 2017 at 04:36:25 UTC, Saurabh Das wrote:
On Wednesday, 11 October 2017 at 08:11:37 UTC, Jonathan M Davis 
wrote:
On Wednesday, October 11, 2017 06:25:19 Dhananjay via 
Digitalmars-d-learn wrote:

Hello,

I am upgrading to DMD 2.076.1 from DMD 2.069.2 (similar 
results on 2.075.1), and seeing a huge increase in unittest 
compilation time when the -deps parameter is also passed to 
dmd. This is on both OSX and linux. What can be the cause of 
this?


Well, that's a pretty big version jump. So, a lot could have 
changed. One thing that comes to mind would be that imports 
were overhauled pretty thoroughly to try and fix various 
import bugs. This blog article talks about some of that:


http://www.schveiguy.com/blog/2016/03/import-changes-in-d-2-071/

Or the change could be the result of something else entirely. 
Figuring it out would likely require doing a fair bit of 
debugging to narrow down when the change happened (and that's 
assuming that it's caused by a single commit or small set of 
commits rather than simply getting worse over time due to a 
variety of factors).


- Jonathan M Davis


The following observations (for the above test program) were 
recorded on Mac OS X 10.11.6:


DMD64 D Compiler v2.073.1
real0m0.091s
user0m0.067s
sys 0m0.020s

DMD64 D Compiler v2.074.0
real0m0.105s
user0m0.072s
sys 0m0.022s

DMD64 D Compiler v2.075.1
real0m44.932s
user0m35.732s
sys 0m7.098s

DMD64 D Compiler v2.076.1
real0m46.833s
user0m37.827s
sys 0m7.254s

Furthermore, 2.075.1 gave a bunch of deprecation warnings in 
std/string.d. The -de switch had to be removed before running.


Hope this helps,
Saurabh


I can reproduce on linux/x64, looks like a memory leak, as dmd 
balloons out to eat up all available memory until it's killed.  I 
see it with this minimal command passed to dmd 2.075.1, but not 
the 2.074.1 frontend, as reported:


./dmd2/linux/bin64/dmd -c -o- foo.d -unittest -deps=foo.deps

The closest issue I was able to find in bugzilla is this one, but 
that says it goes away with -o-, not the case here:


https://issues.dlang.org/show_bug.cgi?id=17601

I suggest one of you file a bug with the minimal command, noting 
that it goes away if -unittest or -deps is not passed.  Make sure 
you mark it as a regression, just like the above bug, as Walter 
pays special attention to those.


Re: Huge increase in UT compile time

2017-10-13 Thread Saurabh Das via Digitalmars-d-learn
On Wednesday, 11 October 2017 at 08:11:37 UTC, Jonathan M Davis 
wrote:
On Wednesday, October 11, 2017 06:25:19 Dhananjay via 
Digitalmars-d-learn wrote:

Hello,

I am upgrading to DMD 2.076.1 from DMD 2.069.2 (similar 
results on 2.075.1), and seeing a huge increase in unittest 
compilation time when the -deps parameter is also passed to 
dmd. This is on both OSX and linux. What can be the cause of 
this?


Well, that's a pretty big version jump. So, a lot could have 
changed. One thing that comes to mind would be that imports 
were overhauled pretty thoroughly to try and fix various import 
bugs. This blog article talks about some of that:


http://www.schveiguy.com/blog/2016/03/import-changes-in-d-2-071/

Or the change could be the result of something else entirely. 
Figuring it out would likely require doing a fair bit of 
debugging to narrow down when the change happened (and that's 
assuming that it's caused by a single commit or small set of 
commits rather than simply getting worse over time due to a 
variety of factors).


- Jonathan M Davis


The following observations (for the above test program) were 
recorded on Mac OS X 10.11.6:


DMD64 D Compiler v2.073.1
real0m0.091s
user0m0.067s
sys 0m0.020s

DMD64 D Compiler v2.074.0
real0m0.105s
user0m0.072s
sys 0m0.022s

DMD64 D Compiler v2.075.1
real0m44.932s
user0m35.732s
sys 0m7.098s

DMD64 D Compiler v2.076.1
real0m46.833s
user0m37.827s
sys 0m7.254s

Furthermore, 2.075.1 gave a bunch of deprecation warnings in 
std/string.d. The -de switch had to be removed before running.


Hope this helps,
Saurabh




Re: Huge increase in UT compile time

2017-10-11 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, October 11, 2017 06:25:19 Dhananjay via Digitalmars-d-learn 
wrote:
> Hello,
>
> I am upgrading to DMD 2.076.1 from DMD 2.069.2 (similar results
> on 2.075.1), and seeing a huge increase in unittest compilation
> time when the -deps parameter is also passed to dmd. This is on
> both OSX and linux. What can be the cause of this?

Well, that's a pretty big version jump. So, a lot could have changed. One
thing that comes to mind would be that imports were overhauled pretty
thoroughly to try and fix various import bugs. This blog article talks about
some of that:

http://www.schveiguy.com/blog/2016/03/import-changes-in-d-2-071/

Or the change could be the result of something else entirely. Figuring it
out would likely require doing a fair bit of debugging to narrow down when
the change happened (and that's assuming that it's caused by a single commit
or small set of commits rather than simply getting worse over time due to a
variety of factors).

- Jonathan M Davis



Re: Huge increase in UT compile time

2017-10-10 Thread Dhananjay via Digitalmars-d-learn

Another observation:
wc -l test.dep (for "-deps=test.dep ... -unittest -main" command):
Linux 2.076.1: 41389
Linux 2.069.1: 144

Making small changes to 2.069.1 runtimes (I had run with a 
different program by mistake. The measurement is still of the 
same order)


On Wednesday, 11 October 2017 at 06:25:19 UTC, Dhananjay wrote:

Hello,

I am upgrading to DMD 2.076.1 from DMD 2.069.2 (similar results 
on 2.075.1), and seeing a huge increase in unittest compilation 
time when the -deps parameter is also passed to dmd. This is on 
both OSX and linux. What can be the cause of this?


Sample program:

import std.stdio: writeln;

unittest { writeln("TestUT"); }

version (unittest) {}
else
{
void main()
{
writeln("TestMain");
}
}

Observations:

Command: time dmd -deps=test.dep -c -o- test.d -de -w -m64 
-color -g -debug -gs -unittest -main

Linux runtime: user 0m28.192s<< Note the increase
OSX runtime: user 0m48.508s <<

Linux 2.069.1 runtime: user 0m0.045s 


Command: time dmd -c -o- test.d -de -w -m64 -color -g -debug 
-gs -unittest -main

Linux runtime: user 0m0.064s
OSX runtime: user 0m0.090s

   Linux 2.069.1 runtime: user 0m0.053s 


Command: time dmd -deps=test.dep -c -o- test.d -de -w -m64 
-color -g -debug -gs

Linux runtime: user 0m0.584s
OSX runtime: user 0m0.882s

  Linux 2.069.1 runtime: user 0m0.035s  


Command: time dmd -c -o- test.d -de -w -m64 -color -g -debug -gs
Linux runtime: user 0m0.048s
OSX runtime: user 0m0.074s

  Linux 2.069.1 runtime: user 0m0.036s   


Environment:
OSX: El Capitan 10.11.6
Linux with DMD 2.076.1: Gentoo 4.9.34
Linux with DMD 2.069.1: Centos 7





Huge increase in UT compile time

2017-10-10 Thread Dhananjay via Digitalmars-d-learn

Hello,

I am upgrading to DMD 2.076.1 from DMD 2.069.2 (similar results 
on 2.075.1), and seeing a huge increase in unittest compilation 
time when the -deps parameter is also passed to dmd. This is on 
both OSX and linux. What can be the cause of this?


Sample program:

import std.stdio: writeln;

unittest { writeln("TestUT"); }

version (unittest) {}
else
{
void main()
{
writeln("TestMain");
}
}

Observations:

Command: time dmd -deps=test.dep -c -o- test.d -de -w -m64 -color 
-g -debug -gs -unittest -main

Linux runtime: user 0m28.192s<< Note the increase
OSX runtime: user 0m48.508s <<
Linux 2.069.1 runtime: user 0m0.009s

Command: time dmd -c -o- test.d -de -w -m64 -color -g -debug -gs 
-unittest -main

Linux runtime: user 0m0.064s
OSX runtime: user 0m0.090s
Linux 2.069.1 runtime: user 0m0.005s

Command: time dmd -deps=test.dep -c -o- test.d -de -w -m64 -color 
-g -debug -gs

Linux runtime: user 0m0.584s
OSX runtime: user 0m0.882s
Linux 2.069.1 runtime: user 0m0.007s

Command: time dmd -c -o- test.d -de -w -m64 -color -g -debug -gs
Linux runtime: user 0m0.048s
OSX runtime: user 0m0.074s
Linux 2.069.1 runtime: user 0m0.010s

Environment:
OSX: El Capitan 10.11.6
Linux with DMD 2.076.1: Gentoo 4.9.34
Linux with DMD 2.069.1: Centos 7