-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Style "Meters at scale" hogs CPU #28690
Comments
Author Name: Daniel Krüger (@palstek) I made some further debugging with Callgrind and added some qDebug() output to QgsMarkerLineSymbolLayer::renderPolylineInterval(). It seems that QgsSymbolLayerUtils::symbolLayerPreviewPicture() needs a large processing time for generating the icon. That's because it uses some default QgsRenderContext with default ellipsoid. So it draws millions of markers (repeated every 3 meters at scale) on the icon. Where is the right place to fix this scaling issue? If someone is interested I can provide a small test project. It takes a couple of minutes for opening the project. |
Author Name: Johannes Kroeger (Johannes Kroeger) I just ran into this option behaving weirdly and hogging CPU as well. In my case it is NOT hogging CPU when the canvas is EPSG:4326 but it is if the canvas is for example EPSG:3857 or EPSG:25832 (UTM32N). Here is an example project, set the OTF projection to trigger the CPU hogging. You might need to pan around a bit to make it happen. Data is https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_admin_0_countries.zip
|
occurring for drawing a symbol preview Because these have no map association, certain settings like sizes in "meters in map units" will have no meaning, and may need special handling Refs qgis#28690
map extent is available should fallback to a very approximate degrees to meters conversion only We can't do better in this situation! Refs qgis#28690
sizes set in Meters in Map Units, because there's no map context available to calculate these with So, to avoid dangerously small or large sizes, when we are creating preview images we have to just treat these sizes as mm and then clamp them to reasonable size ranges depending on the symbol property This fixes the quasi-hang from qgis#28690, where a marker line symbol with interval in meters in map units caused a symbol preview icon to be drawn with an extremely tiny interval -- resulting in an effectively endless loop while trying to render multiple billion markers around the edge of the symbol preview icon. It's not ideal, but there's no better approach we can take here! Fixes qgis#28690
occurring for drawing a symbol preview Because these have no map association, certain settings like sizes in "meters in map units" will have no meaning, and may need special handling Refs #28690
map extent is available should fallback to a very approximate degrees to meters conversion only We can't do better in this situation! Refs #28690
sizes set in Meters in Map Units, because there's no map context available to calculate these with So, to avoid dangerously small or large sizes, when we are creating preview images we have to just treat these sizes as mm and then clamp them to reasonable size ranges depending on the symbol property This fixes the quasi-hang from #28690, where a marker line symbol with interval in meters in map units caused a symbol preview icon to be drawn with an extremely tiny interval -- resulting in an effectively endless loop while trying to render multiple billion markers around the edge of the symbol preview icon. It's not ideal, but there's no better approach we can take here! Fixes #28690
Author Name: Daniel Krüger (@palstek)
Original Redmine Issue: 20871
Affected QGIS version: 3.4.2
Redmine category:symbology
After selecting "Meters at scale" option in a style QGIS becomes unresponsive for couple of seconds to several minutes. This involves at least the following situations:
I attached gdb to a running QGIS process and pressed CTRL-C when clicking on symbol tab sheet in layer settings and the dialog got unresponsive for a minute or so. Maybe this helps a little bit.
Bug report #26289 seems to be the same. However I cannot reopen it.
The text was updated successfully, but these errors were encountered: