Commit 4f30a44
committed
Postgis: cache information about enum fields
This is called several times and can slow down substantially
the opening of the attribute table.
Partially fixes #21303 (down from ~30 to ~6 seconds on a remote
connection)
The remaining ~4 seconds (compared to ~2 seconds in 2.18) are due
to the check for enums and provider-side constraints, that were
not implemented in 2.18.
See: QgsEnumerationWidgetFactory::fieldScore and the call to
enumValues for details, fieldScore is called several times
because QgsAttributeTableModel::loadAttributes is also
called multiple times and it queries for widget configuration
all the times.1 parent e5a416e commit 4f30a44
File tree
2 files changed
+39
-7
lines changed- src/providers/postgres
2 files changed
+39
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1683 | 1683 | | |
1684 | 1684 | | |
1685 | 1685 | | |
1686 | | - | |
1687 | 1686 | | |
1688 | 1687 | | |
1689 | 1688 | | |
1690 | 1689 | | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
1691 | 1699 | | |
1692 | | - | |
| 1700 | + | |
1693 | 1701 | | |
1694 | 1702 | | |
1695 | 1703 | | |
1696 | 1704 | | |
1697 | 1705 | | |
1698 | 1706 | | |
1699 | | - | |
| 1707 | + | |
1700 | 1708 | | |
1701 | 1709 | | |
1702 | 1710 | | |
| 1711 | + | |
1703 | 1712 | | |
1704 | 1713 | | |
1705 | 1714 | | |
1706 | | - | |
1707 | | - | |
| 1715 | + | |
1708 | 1716 | | |
1709 | 1717 | | |
1710 | 1718 | | |
1711 | 1719 | | |
1712 | 1720 | | |
1713 | | - | |
| 1721 | + | |
1714 | 1722 | | |
1715 | 1723 | | |
1716 | 1724 | | |
1717 | 1725 | | |
1718 | 1726 | | |
1719 | 1727 | | |
1720 | 1728 | | |
1721 | | - | |
| 1729 | + | |
1722 | 1730 | | |
1723 | 1731 | | |
1724 | 1732 | | |
| |||
5166 | 5174 | | |
5167 | 5175 | | |
5168 | 5176 | | |
| 5177 | + | |
| 5178 | + | |
| 5179 | + | |
| 5180 | + | |
| 5181 | + | |
| 5182 | + | |
| 5183 | + | |
| 5184 | + | |
| 5185 | + | |
| 5186 | + | |
| 5187 | + | |
| 5188 | + | |
| 5189 | + | |
| 5190 | + | |
| 5191 | + | |
| 5192 | + | |
| 5193 | + | |
| 5194 | + | |
| 5195 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
525 | 529 | | |
526 | 530 | | |
527 | 531 | | |
| |||
530 | 534 | | |
531 | 535 | | |
532 | 536 | | |
| 537 | + | |
533 | 538 | | |
534 | 539 | | |
535 | 540 | | |
| |||
0 commit comments