Visual D: Settings to Improve compil and link process
ParticlePeter via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Jul 5 07:05:07 PDT 2014
Hello Community,
I thought there's a separate forum for VisualD. It did exist when
VisualD was on DSource, so why not add it here as well? Or am I
to blind to see?
Anyway, this thread is an addition to my previous one in this
forum:
http://forum.dlang.org/thread/wkkuvzkzeupyfdpweals@forum.dlang.org
I noticed increasing compile times in my projects. As I use only
VisualD I would like to understand how I would shorten compile
time with this tool.
Brief description to my setup, more details can be fond in the
other post.
I have one Lib, called MyLib consisting of around 15 modules, one
class per module, zero to two template methods per class with one
type parameter each.
All my projects use MyLib, and call the template methods with
different types. Most of the compile time of any of theses
projects is spent in rebuilding MyLib.
I am not sure why and where so much time is spent, but is there a
way to profile my COMPILE time with VisualD?
There are several VisualD project properties which I do not
understand fully, but hope that they might help, namely:
Configuration Properties - General - Files to clean
Configuration Properties - Compiler - Output - Multiple Object
Files
Configuration Properties - Compiler - Output - Keep Path From
Source File
Could not cleaning some files improve compilation ?
Could Multiple Object Files be used to separately compile
non-template and template code blocks ?
What does Keep Path From Source File do at all ?
It is possible to remove the template methods from my classes,
create free functions instead and use them in a UFCS way.
Unfortunately I have not figured out UFCS properly, as my
approaches do not work ( guess due to UFCS restrictions ).
Anyway, would it help ( and is it possible at all ) to put the
template functions in a separate module so that only the
corresponding object file requires a recompile ?
I am asking in the context of the Multiple Object Files setting.
I tried to not build MyLib at all, and use the sources directly,
but the project setup is kind of confusing. Again, there is a
setting which I seem to not understand fully. So one project,
lets say MyProject, has only its own module files added to the
VisualD project. I want the compiler to also use the MyLib source
files, but do not want to add them to MyProject, reasoning
bellow. There is one entry in the project properties, which
should make this behavior possible, but it doses not. Why ?
Configuration Properties - Compiler - General - Additional Imports
As far as I understand this setting, I am supposed to enter
module search paths. But I do get linker errors when I do not add
either MyLib.lib to the linker settings or all the source files
of MyLib to MyProject.
Reasoning why I do not want to do this: I have one solution file
with the MyLib project and ten projects like MyProject using
MyLib. I would need to add all the source files to all the
projects, they would be reachable and editable at 11 different
location within my solution file. This does not not seem to be a
clean way to set it up.
Any advice to any or all the thoughts and issues ?
Thanks in advance.
Cheers, ParticlePeter
More information about the Digitalmars-d-learn
mailing list