-
-
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
Line layer labeling eats up all memory #14066
Comments
Author Name: Martin Dobias (@wonder-sk) I am unable to reproduce the issue here. Could you please try to provide a sample project file with configured labeling and map canvas zoomed in? |
Author Name: Sandro Santilli (@strk) It's not that easy, as if I zoom in enough to reproduce the problem I end up being unable to get control of the machine, so have to kill qgis which then fails saving the project... |
Author Name: Sandro Santilli (@strk) The attache project is at a zoom level good enough to see memory growing. Zoom further to kill the machine...
|
Author Name: Sandro Santilli (@strk) Second version of project file manually tweaked to make the problem more visible.
|
Author Name: Martin Dobias (@wonder-sk) Thanks. Now I am able to reproduce the problem. The labeling library tries to create a huge number of label candidates. The number of candidates is approximately (line length) / (label width) and that is a lot when zoomed in. I think this should be solved by clipping lines that are not entirely in the view. This would also solve the problem of missing labels when zoomed in (= labels outside current extent).
|
Author Name: Martin Dobias (@wonder-sk) I have added clipping of input geometries in 17e864b which fixed that. It's in master branch. I will rather not commit that to 1.7 branch since the clipping might have further side effects I am not aware of.
|
Author Name: Sandro Santilli (@strk) I'm still using 1.7 and this remains the most hit issue I have. Your commit cherry-picks cleanly in 1.7, I'm giving it a try there. The worst that can happen with clipping is an exception, but since qgis uses the C-API it'll be a NULL return which you're handling by skipping labeling for that feature (if I read the code correctly). I'm also guessing the patch is not in 1.8 as I don't see any other commit referenced in "Associated revisions". It'll be important to backport at least there IMHO.
|
Author Name: Sandro Santilli (@strk) Alright, I did hit one of those drawbacks pretty easily :) |
Author Name: Giovanni Manghi (@gioman) can you test with master? thanks.
|
Author Name: Alister Hood (@AlisterH)
|
Author Name: Paolo Cavallini (@pcav)
|
Author Name: Giovanni Manghi (@gioman) Sandro Santilli wrote:
it seems to work fine on the latest master, please leave feedback.
|
Author Name: Giovanni Manghi (@gioman) Closing for lack of feedback. I assume that this was fixed. Please reopen if necessary.
|
Author Name: Sandro Santilli (@strk)
Original Redmine Issue: 4083
Affected QGIS version: master
Redmine category:labelling
At high zoom levels, layer with new layer labeling activated consume lots of memory. So much to eventually render the machine unusable.
Il'll attach a shapefile with the data I'm testing this with.
To reproduce:
This is happening as of 3ac604f (1.7.0+)
I haven't tried with POINT or POLYGON layers.
The text was updated successfully, but these errors were encountered: