Bug report #19480

QGIS 3.2 takes very long to start up and uses very much memory

Added by Holger Eberhardt over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Symbology
Affected QGIS version:3.2.1 Regression?:No
Operating System:Windows 10 64 Bit Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:27308

Description

After updating to version 3.2, my QGIS Installation takes more than 20 minutes to start the program. After the start, it uses > 1GB of RAM - without any project file opened.

During startup, the program quickly proceeds to a point, where the small startup screen says "Gespeicherte Stile werden geladen" ("Populate saved styles"?). There it remains for more than 20 minutes with qgis constantly using about 25 % of CPU power (= 1 core on my 4 core machine).
Another machine here in our office is not affected. So I suspect, that my problem might be caused by a great number of custom styles, that I have imported into my QGIS in the styles management window. Although the system started flawlessly in version 3.0 with the same styles already imported. Sadly removing the imported styles did not resolve the issue.
For reproducing my suspicion, a zip with the xml file containing the style descriptions can be downloaded under the following link:
https://depot.bfn.de/ssf/s/readFile/share/3201/2319652617771772039/publicLink/GIS_Planzeichen_Download.zip

PlanZ_QGIS_LP_BfN.zip (34.9 KB) Nyall Dawson, 2018-07-30 07:20 AM

Associated revisions

Revision 3c8b156c
Added by Nyall Dawson over 6 years ago

Abort expression parsing after encountering a maximum of 10 errors

Fixes #19480

Revision 23b76efe
Added by Nyall Dawson over 6 years ago

Abort expression parsing after encountering a maximum of 10 errors

Fixes #19480

(cherry-picked from 3c8b156c)

History

#1 Updated by Giovanni Manghi over 6 years ago

  • Status changed from Open to Feedback

Try removing the entire .qgis3 folder, then try again and report back. Thanks.

#2 Updated by Holger Eberhardt over 6 years ago

After your advice I searched a bit in the various QGIS3 folders and found a file named symbology-style.db in the folder
C:\Users\...\AppData\Roaming\QGIS\QGIS3\profiles\default
I removed (renamed) this file and now the program starts up quickly again.

Thanks for your hint!

P.S.: The size of the old file was 48.4 MB. The new file that QGIS created upon next start is 384 kB.

P.P.S.: So I can use QGIS 3 again, but I think, that it should be possible to store a few hundred styles without making the program nearly unusable.

#3 Updated by Alessandro Pasotti over 6 years ago

If you were able to check with a few hundred styles, and possibly verify that this is in fact a regression over 2.x I think this would be a rather serious bug that worths squashing.

#4 Updated by Giovanni Manghi over 6 years ago

Alessandro Pasotti wrote:

If you were able to check with a few hundred styles, and possibly verify that this is in fact a regression over 2.x I think this would be a rather serious bug that worths squashing.

I imported the provided styles in QGSI 2.18 and the restarted QGIS: all ok.

#5 Updated by Nyall Dawson over 6 years ago

That download link isn't working - can you provide a new one?

#6 Updated by Holger Eberhardt over 6 years ago

Nyall Dawson wrote:

That download link isn't working - can you provide a new one?

Hmmm? Just checked it and it works here.

#7 Updated by Jürgen Fischer over 6 years ago

  • Description updated (diff)

#8 Updated by Holger Eberhardt over 6 years ago

Nyall Dawson wrote:

That download link isn't working - can you provide a new one?

I just uploaded the file to my dropbox account:
https://www.dropbox.com/s/nc87lm8xbu317m0/GIS_Planzeichen_Download.zip?dl=0

#9 Updated by Nyall Dawson over 6 years ago

https://github.com/qgis/QGIS/pull/7501 Fixes this. But the underlying issue is a very bad (disabled) expression set for some symbol data defined properties. This expression looks like a number of features pasted into the expression, which blows out the size of every symbol definition by an extra 290k characters. I've attached a (hopefully) fixed version of the symbols below.

#10 Updated by Nyall Dawson over 6 years ago

  • % Done changed from 0 to 100
  • Status changed from Feedback to Closed

Also available in: Atom PDF