Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow selection of outlines #345

Open
1 task
jducnuigeen opened this issue Nov 29, 2019 · 1 comment
Open
1 task

Slow selection of outlines #345

jducnuigeen opened this issue Nov 29, 2019 · 1 comment

Comments

@jducnuigeen
Copy link
Contributor

Bug Description

As an LDA doing buildings QA, during alter relationships, the user must often select individual/multiple outlines while making changes to a relationship. This action queries the db, checking the added/removed table, checking the matched table, and checking the related table. Performance/response of the database to these selections can be slow, sometimes upwards of 10 seconds per selection. Investigate if there is a way to speed up selection (possibly using the layers already loaded).

###Acceptance Criteria:

  • Selection of outlines using the full buildings db is fast

Desktop

  • Environment: Windows & Daas
  • QGIS 3.4
@YingtingChen
Copy link
Contributor

related function: https://github.com/linz/nz-buildings/blob/master/buildings/gui/alter_building_relationships.py#L302

(possibly using the layers already loaded)

Just had a try using the layers (in the pic). Those layers are views which only have either bulk_load_outline_id or building_outline_id. So for those added or removed outlines we can check if the id is in the layer. But matched or related outlines will still need to query the db as we want all the corresponding outlines

image

Or we could add another column in the view
e.g. related_bulk_load_outlines

bulk_load_outline_id related (jsonb)
2033 {"bulk_load_outline_id": [2033, 2034], "building_outline_id": [1023, 1033]}

this way we could get all the information through the layers not db

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants