We experience slow performance in QGIS 3.xx (also tried with 3.20 with no noticable improvement). Data are stored in a PostgreSQL/PostGIS database and we have done enough testing that we do not believe that the database is the problem.
The slowness shows its ugly face when for instance the program freezes for a long time when performing even simple tasks, like e.g. saving the project or moving the map in the window.
The issue increases with the size of the project and we don't experience any noticable slowness in small to medium sized projects. The project I tested with most recently was about 4-5 MB when saved in QGIS 3 format (qgz) and about 40 MB when saved unzipped (qgs).
The project contains perhaps +/-100 vector layers from PostgreSQL/PostGIS data and a few online layers (basemap, etc.). Has anybody encountered anything similar and perhaps even found the reason and a solution? Or is anybody aware of some software that could help debug/analyze QGIS to find out what takes all that time?
As implied earlier we have tried and tested a lot including running QGIS on the same physical server as the database to eliminate network issues.