Re: [Qbs] Improving qbs resolve performance

2019-08-29 Thread Christian Gagneraud
On Fri, 30 Aug 2019 at 11:01, Jochen Ulrich  wrote:
> I want to follow up on this topic:

I had to check the archives and re-read the whole thread!

> I created scripts to generate a Qbs project of a specified size.
> Then, I created a few projects and measured the resolve time.

Nice one. Maybe it would be nice to automate the data collection, this
way it might be interesting to plot the various measurement versus
tree depth and/or child count and/or product count. Just to see if we
have something linear or logarithmic.
Or maybe that's a job for a C++ benchmark...

> Bottom line:
> Exporting dependencies significantly slows down the resolving.
> It is better to explicitly depend on the needed modules instead of having 
> another module export the dependency.
> It’s a trade-off between having to write more “Depends” items vs. slower 
> resolving.

Good to know, But the Export/Depends has definitely it's use, you
don't need to track nested dependencies.

Random thoughts:
Is it realistic a depth of 9?
Looking at your timings, it is still not clear where the bunch of the
time is spent for the "withLeafExports/9-2-implicit" use case.

Thanks,
Chris
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] Improving qbs resolve performance

2019-08-29 Thread Jochen Ulrich
I want to follow up on this topic:

I created scripts to generate a Qbs project of a specified size.
Then, I created a few projects and measured the resolve time.

Bottom line:
Exporting dependencies significantly slows down the resolving.
It is better to explicitly depend on the needed modules instead of having 
another module export the dependency.
It’s a trade-off between having to write more “Depends” items vs. slower 
resolving.

The scripts and the results can be found here: 
https://gist.github.com/j-ulrich/35f345007809c77403a8ee88f4d9db11

Best
Jochen
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] Use compiler flags file generated by a rule

2019-08-29 Thread Christian Kandeler
On Thu, 29 Aug 2019 13:19:49 +0200 (CEST)
"Richard Weickelt"  wrote:

> I want to integrate a generator tool into a Qbs build flow. This tool is very 
> slow and produces a bunch of .h/.c files and a "compiler.opt" file with some 
> compiler flags. I need to use these flags to build the current product and 
> also export them to dependent products.

I don't see how to achieve the seond part, at least not for general options. 
The first one should be possible by massaging the system a little:
- Declare the .opt file as the sole output of the rule that runs the 
generator.
- Have a second rule that takes the .opt file as an input.
- Pretend that this rule creates the .h and .cpp files.
- In the outputArtifacts script, read the .opt file and set cpp.cxxFlags on 
the outputs accordingly.
- The actual command is a no-op.

Christian
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


[Qbs] Use compiler flags file generated by a rule

2019-08-29 Thread Richard Weickelt
Hi,

I want to integrate a generator tool into a Qbs build flow. This tool is very 
slow and produces a bunch of .h/.c files and a "compiler.opt" file with some 
compiler flags. I need to use these flags to build the current product and also 
export them to dependent products. I guess this is not possible with Qbs 
because all flags in the build graph need to be determined before the actual 
build starts. Or is it possible to inject flags into the build graph during the 
build?

Thanks
Richard
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs