Hi all,
I'd like to share with you a report of the work I did on QEP 338 (SIP incremental builds):

My original plan was to build each header file as a separate binding, then use SIP from a Python script, overriding a few methods to allow building just one binding out of a project.

After a lot of effort, this plan sadly doesn't seem workable. PyQt's bindings aren't modularised enough, so building a single binding still needs to parse almost all of PyQt. Furthermore, SIP has a multi-stage parse-resolve-generate design, but the "parser" does more than just parse the code into an AST, not all references are resolved in the resolve phase, and imports are currently basically done by textual inclusion.

I've tried making the necessary changes to SIP [1] and QGIS [2], but for the above reasons, I don't think the performance benefits for single-file builds are worth the added complexity and performance penalty for clean builds (which look to be over an hour currently).

The good news is that with the knowledge from working on SIP, I've been able to improve the performance of regular clean builds, and those improvements might soon be merged into SIP itself [3]. I've also made some changes on the QGIS side to not rebuild unchanged code generated by SIP [4]. With code compilation now taking longer than SIP code generation, this effectively gives us incremental builds, just at a larger granularity.

David Koňařík

[1]: https://github.com/dvdkon/sip/tree/qgis-gb
[2]: https://github.com/dvdkon/QGIS/tree/sip-incremental-build
[3]: https://github.com/Python-SIP/sip/pull/87
[4]: https://github.com/qgis/QGIS/pull/63160
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to