You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
QGIS version
3.40.2-Bratislava
QGIS code revision
[14826ca](https://github.com/qgis/QGIS/commit/14826ca1e4a)
Libraries
Qt version
5.15.13
Python version
3.12.3
GDAL/OGR version
3.8.4
PROJ version
9.4.0
EPSG Registry database version
v11.004 (2024-02-24)
GEOS version
3.12.1-CAPI-1.18.1
SQLite version
3.45.1
PostgreSQL client version
16.6 (Ubuntu 16.6-0ubuntu0.24.04.1)
SpatiaLite version
5.1.0
QWT version
6.1.4
QScintilla2 version
2.14.1
OS version
Ubuntu 24.04.1 LTS
What is the bug or the crash?
When trying to figure out why QGIS gets frozen and really slow with more than 200 layers, I noticed expression variables are calculated really often.
Steps to reproduce the issue
To reproduce the issue it's easiest to add log line to
QgsExpressionContextUtils::layerScope
method and then do following steps:These simple steps produce 85 lines for memory polygon layer, 123 lines for gpkg polygon layer and 226 lines for PostGIS layer.
Versions
Version details
<style type="text/css"> p, li { white-space: pre-wrap; } </style>Libraries
Qt version
5.15.13
Python version
3.12.3
GDAL/OGR version
3.8.4
PROJ version
9.4.0
EPSG Registry database version
v11.004 (2024-02-24)
GEOS version
3.12.1-CAPI-1.18.1
SQLite version
3.45.1
PostgreSQL client version
16.6 (Ubuntu 16.6-0ubuntu0.24.04.1)
SpatiaLite version
5.1.0
QWT version
6.1.4
QScintilla2 version
2.14.1
OS version
Ubuntu 24.04.1 LTS
Active Python plugins
db_manager
0.1.20
MetaSearch
0.3.6
processing
2.12.99
grassprovider
2.12.99
Supported QGIS version
New profile
Additional context
Maybe some kind of caching should be used to limit amount of times variables are calculated?
The text was updated successfully, but these errors were encountered: