rdmd takes 2-3 seconds on a first-run of a simple .d script

BoQsc vaidas.boqsc at gmail.com
Sat May 25 08:32:08 UTC 2019


> rdmd is a companion to the dmd compiler that simplifies the 
> typical edit-compile-link-run or edit-make-run cycle to a rapid 
> edit-run cycle. Like make and other tools, rdmd uses the 
> relative dates of the files involved to minimize the amount of 
> work necessary. Unlike make, rdmd tracks dependencies and 
> freshness without requiring additional information from the 
> user.

> Source: https://dlang.org/rdmd.html

I have a simple standard .d script and I'm getting annoyed that 
it takes 2-3 seconds to run and see the results via rdmd.

This might sound like insanely laughable time to be annoyed by, 
but it is a enough of a problem for me to make a Thread in a D 
lang Forum.

Every time I make a change to a script it takes at least 2 
seconds on my computer for it to run, if you are beginner like me 
- you know it is not very pleasant to wait out that duration. I 
wonder if anything can be done about it, why it takes so "much" 
time, and why can't the results show up in a few milliseconds 
instead?

#!/usr/bin/env rdmd
import std.stdio, std.process;

void main() {

	writeln("This writeln is taking long time ");
	executeShell("pause");

}


More information about the Digitalmars-d-learn mailing list