Okay, so I'm going to tell to you about Frost IDL CPP and how you can make your
rows to build faster and even if you're not using rows to be able to apply at least some
of that to your own projects.
So first before talking about Frost IDL CPP, we need to look at Frost IDL.
So first of all, it's set of packages that is responsible for building your messages.
So here we have an example for the pigs for messages package and this is the build process.
Every color is a step in the build process and we can see that we have basically two types
of steps.
We have 10 long Python processes that are the Ross IDL Generators, they're taking quite
a lot of time for this package because pigs for messages are over 100 interfaces.
So it takes a lot of time to generate interfaces and there are smaller compilation steps
that also need to be run.
So you can use your messages in your projects.
So for this package on my machine it took a minute 21 to build.
So it's quite long, it's a large package but it's long just for interfaces.
So my first IDL was to reimplement everything in C++ and by doing so, the Generators are
between 30 to 300 times faster.
So now the build is down to 13.8 seconds.
So it's much faster.
We can barely see the Generators anymore.
As I in blue at the beginning, we have the generator for the Python interfaces at the end
and in the middle size, like two or three of them.
But it's much faster and now we see that it's actually the compilation steps as a Tarze
and some of them are quite small at the beginning, the first ones are very small.
But in the middle section, there are a few compilation steps that are over 100 milliseconds.
So can we make this faster?
Well, if we look in detail at what the compiler is doing.
So GCC and Chrome they both have a time report that basically tells you what the compiler
is spending time on and for those steps, the compiler is spending a lot of time parsing the files
that he is trying to compile and even if your messages are small, it's still going to take
a lot of time because all methods, they include headers and those headers, once the preposteriser
can make files quite large and the compilation needs to parse files that are very large and
moreover for every interface, the compiler is run multiple times and it's parsing the same files
every time for every message.
So when we have a situation like that, what we can use is pre-compiled headers.
Pre-compiled headers, as well as are very easy to use with C-Max, there is a function target
pre-compiled headers where you tell it which header you want to pre-compile and it will add
a few steps that we see in green here that will pre-compile your headers and then that
makes compilation steps much faster and with this we can get the compilation the build down to
5.8 seconds for picks for messages but we can get even better, once I re-implemented the
generators, I noticed that here we are seeing that they wait on each other, there are three
of them that started the beginning, there are a few in the middle and pick Python is running
last but in fact they don't depend on each other at all. So we can just run them right at the
beginning and we will gain a few milliseconds in this case, this change was contributed back to
RSIDL and on rolling it was merged two weeks ago, on rolling it shouldn't make the build
almost twice as fast. So yeah that's it, check out RSIDL CPP, especially if you have very large
packages with a lot of messages. Thank you.
We're just going to have a little