Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
From: Adriaan van Os
Subject: --propagate-units
Date: 19 Dec 2004, 13:57:57
Frank Heckenbach wrote:
> - new options `--[no-]propagate-units' (on by default with
> `--mac-pascal', off in other dialects) (fjf987*.pas) (M)
Here are some additional notes about the --[no-]propagate-units flag.
1. Compilation speed
In GPC, loading .gpi files is a recursive process of order O (2). This
means that:
- the more units, the slower GPC becomes
- in large projects with many units, most time is spent in loading and
reloading of .gpi files.
The workaroud is to:
(a) activate --propagate-units (this copies .gpi data of used units
into the .gpi file of the compiled unit)
(b) remove all USES clause entries for units that are no longer needed
(because they are not used at all or because of the --propagate-units
flag)
(c) use gp instead of gpc (gp works very well and doesn't have the bugs
of --automake)
This will lead to a dramatic increase in compilation speed for large
GPC projects.
2. Master units
Suppose, we have a program P that uses units tb1, tb2, tb3, tb4,
representing a custom toolbox, plus some other units
program P; uses tb1, tb2, tb3, tb4, util1, util2; ...
Now, we can put toolbox units tb1, tb2, tb3 and tb4 in a master
"toolbox" unit
unit toolbox;
interface
uses tb1, tb2, tb3, tb4;
end.
and use it in P instead of tb1 ... tb4
program P; uses toolbox, util1, util2; ...
We have gained the freedom to make interface changes to tb1 .. tb4,
without the need of changes at a higher level (e.g. you can add a unit
tb5 or move a routine from one tb unit to another).
3. Local use
The compiler directives {$propagate-units} and {$no-propagate-units}
can be used for fine-tuning or selective unit-propagation.
Regards,
Adriaan van Os
Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
| Author | Subject | Date |
|---|---|---|
| Frank Heckenbach | --propagate-units | 19 Dec 2004, 14:16:05 |
| Author | Subject | Date |
|---|---|---|
| Frank Heckenbach | gpc-20041218 released | 19 Dec 2004, 03:01:51 |
Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.
Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.
This page was created by Crystal 0.999 (Linux 2.4.27/i686).