sip: feature: make build faster by running configure and codegen in parallel

Milan Hauth milahu at gmail.com
Sat Jun 11 21:29:42 BST 2022


currently there are two bottlenecks in sip: configure and codegen

these run on a single core, which takes some time

code:

sipbuild/project.py

```py
    def update_buildable_bindings(self):
       # ...

        # TODO perf: run this in parallel
        for b in list(self.bindings.values()):
            if not b.is_buildable():
                del self.bindings[b.name]
```

is_buildable is implemented for example by pyqt-builder in
pyqtbuild/bindings.py

```py
    def is_buildable(self):
```

challenge:
capture stdout and stderr of the configure's
and send them to logfiles, to allow later inspection

bottleneck 2 is codegen:

sipbuild/builder.py

```py
        # TODO perf: run this in parallel
        for bindings in project.bindings.values():
            project.progress(
                    "Generating the {0} bindings".format(bindings.name))
```

the build phase of pyqt-builder
already runs parallel with the --jobs argument

pyqtbuild/builder.py

```py
        options.append(
                Option('jobs', option_type=int,
                        help="run N make jobs in parallel", metavar='N'))
```


More information about the PyQt mailing list