Bug report #7616

Select is slower if canvas show a lot of features

Added by Pedro Venâncio about 11 years ago. Updated almost 11 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:-
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:16542

Description

The selection of features from the attribute table becomes very slow if the full extent of a layer is visible on the canvas.

For example, applying a filter to a polygon shapefile and selecting ~900 features, with the full extent of the layer visible on canvas, takes 21s. If the layer is at a scale of about 1:2.000, the same selection is almost instantaneous.

This happens both in master and 1.8.

Something similar happens at the start/stop editing (toggle editing).

This is most noticeable with heavy and more complex layers.

History

#1 Updated by Matthias Kuhn about 11 years ago

  • Status changed from Open to Feedback

Selection performance with open attribute table has been improved significantly in 47c10db1fee8f608a2d6e4c50cb89fbc0e0f49f8 (2 days ago)
Can you confirm, that this still happens with newer versions?

#2 Updated by Pedro Venâncio about 11 years ago

Hi Matthias,

The performance increased dramatically after your commit! Thank you very much for your work!

The only situation where I did not noticed a performance boost, was in this particular situation.

As I said, this is not a regression, since it also occurs in QGIS 1.8.

#3 Updated by Matthias Kuhn about 11 years ago

I will need some more information to investigate this.

  • Does it only happen with the attribute table open?
  • How long does rendering take without the attribute table open?
  • How are you selecting features (on the attribute table, on the canvas, with an expression...)
  • Do you have a filter applied in the attribute table window?
  • How many features are there in total?

I'm sorry, but I can't promise a fix. It took me already some time to get the current improvements.

#4 Updated by Pedro Venâncio about 11 years ago

Matthias,

Sorry, but after some more tests, I see that this problem, at this time, only occurs when the layer is being edited (toggle editing on).

Moreover, it takes exactly the same time (20 seconds):
- from the moment when I click on toggle editing button until the moment the editing is ready;
- as the time it takes to select one single polygon from the attribute table (regardless of the size/area of that polygon);
- as also the time it takes to select one single polygon through canvas with "Select single feature" button.

The time mentioned relate to a polygon layer, with 8612 features.

At this point, I have great difficulty to believe that this problem is related to the attribute table. What do you think?

#5 Updated by Matthias Kuhn about 11 years ago

Well, in this case probably not related to the attribute editor.

Maybe it's related to all the rubberbands (or vertexmarkers?) being created and rendered for each single point of all these polygons?

#6 Updated by Pedro Venâncio about 11 years ago

  • Status changed from Feedback to Closed

Matthias you're right, I found a significant increase in performance just disabling the option "Make lines appear less jagged at the expense of some drawing performance" on Rendering settings.

I think we can close this ticket, since it has nothing to do with what initially suspected. And it seems that is directly related to Feature #3200 .

Thanks Matthias!

#7 Updated by Matthias Kuhn about 11 years ago

Note for future reference:
Settings -> Options-> Digitizing -> Vertex markers / Show markers only for selected features
can help to improve performance dramatically in the case you mentioned (while changing the workflow of course)

#8 Updated by Pedro Venâncio almost 11 years ago

Thanks Matthias!

Also available in: Atom PDF