Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gde-exporter
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Dynamic ExposureDynamic Exposure
  • Global Dynamic ExposureGlobal Dynamic Exposure
  • gde-exporter
  • Merge requests
  • !11

Introduced optimisations to avoid querying the databases when not necessary

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Cecilia Nievas requested to merge enhancement/optimisation into main Aug 11, 2022
  • Overview 0
  • Commits 1
  • Pipelines 2
  • Changes 7

This MR alters the ExportHandler class so that:

  • Track is kept of the exposure entity of the previous data unit ID run. If it is the same, then cost_assumptions and people_distribution are not retrieved again.
  • It first checks if the data-unit tile contains any buildings at all (OBM, remainder, aggregated). If there are no buildings at all, then it jumps all the remaining code and goes to the next realisation of the loop (i.e. it does not query the database to obtain building classes, etc).

The test of the ExportHandler class was extended to cover relevant new processing cases that arise from these changes.

Other minor changes are associated with logging and docstrings, as well as making sure that DatabaseQueries.get_numbers_buildings_for_data_unit_tile returns floats even when the fields in the database are NULL.

Edited Aug 11, 2022 by Cecilia Nievas
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: enhancement/optimisation