[QGIS-Developer] Loading Times of QGIS Relations in Attribute Table Form View

Dorscheid.Dominique.Extern at swm.de Dorscheid.Dominique.Extern at swm.de
Thu Sep 23 07:52:49 PDT 2021


Greetings Dear QGIS Developer Community,

We have a problem with layer relations. In our project, we have many layers (>100) with a lot of relations (up to 10 per layer), all of them bidirectional. Bidirectional means, when layer A references B, layer B always references A, too. The layers are based on a PostGIS/Postgres database.
When we open the form view of the attribute table, the relations are all expanded in the GUI and loaded from database immediately. This means loading times are sometimes longer than a minute, while QGIS freezes. We were looking into possibilities to change the default behaviour, so the relations are initially collapsed (and loaded lazily) instead of extended, when the form in the attribute table opens.

However, we couldn't find any option to do this programmatically in PyQGIS or to manipulate the attribute table settings in the Qgis.ini. Alternatively, it would help if it would be possible to limit the recursion depth from Python. Meaning, a relation in a sub-form should not continue to load its respective relations and don't expand them neither.

Could you help us to find a solution to our problem? We would be grateful for any proposals!

Best Regards
Dominique Dorscheid

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20210923/b0223dba/attachment.html>


More information about the QGIS-Developer mailing list