/ QGIS Public
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse the repository at this point in the history
Mark common postgresql types as non-enumerable upon load
This fixes a big performance issue when loading projects with PostgreSQL layers. In the last stage of project loading, code in QgisApp would run code to resolve broken layer dependencies, which in turn tried to find out best edit widget for all columns of all layers, and the enumeration widget tried to figure out all enum values, doing two SQL calls for each column for each layer. We know what are types of columns when loading a layer, so enumValues() can leave early without doing the excessive queries when it's not necessary. Testing on a real world QGIS project with 300+ layers (but not all PostgreSQL): - before: ~35 minutes to load / ~8K PostgreSQL queries - after: ~10 minutes to load / ~2K PostgreSQL queries
- Loading branch information
Showing 1 changed file with 5 additions and 0 deletions.