Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove the inclusion of the all-encompassing Types.hpp header in Task…
…Base.hpp This saves both CPU time and memory during the build. On control/orogen/auv_control, which only imports the 'base' typekit, we save on my (very old Core 2 Duo) machine 1min 20s and 250M of memory (benchmark done with -j1). On -j4, this would mean roughly 1G of memory. In addition, it avoids unnecessarily rebuilding task files. The Types.hpp headers include all types of a typekit, as well as the imported typekits, which means that we currently MUST rebuild all task files as soon as a single header is modified in e.g. base/types. BACKWARD INCOMPATIBILITY: since a lot less headers are included, the user-facing code in Task.cpp / Task.hpp cannot assume that all types are available anymore. This does include typedefs that are used in the orogen file. All types must be manually included in Task.hpp. For instance, as base::commands::Joints is a typedef, one would need to include base/commands/Joints.hpp explicitly even if there is a port of type base::commands::Joints on the task. I personally think that it is worth it. RAW DATA Command being timed: "make -C build/tasks" Without this commit: User time (seconds): 249.27 System time (seconds): 16.02 Percent of CPU this job got: 99% Elapsed (wall clock) time (h:mm:ss or m:ss): 4:27.81 Maximum resident set size (kbytes): 893588 With the patch: User time (seconds): 176.46 System time (seconds): 12.16 Percent of CPU this job got: 99% Elapsed (wall clock) time (h:mm:ss or m:ss): 3:09.72 Maximum resident set size (kbytes): 640356
- Loading branch information