Bug report #4523
QGIS hangs when selecting a feature with the "Node Tool"
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | - | ||
Category: | Digitising | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | Yes | Copied to github as #: | 14441 |
Description
Sample data here:
http://www.faunalia.pt/downloads/test_slow_vector.zip
Toggling editing and try use the node tool freezes QGIS.
This is the extreme case of the current poor performance when editing complex (with many nodes) lines/polygons.
Related issues
Associated revisions
fix #4523:
- make geometry validation optional: none, QGIS and GEOS
- move internal validation to QgsGeometryValidator thread
- cache wkt in QgsCoordinateReferenceSystem
- fTools: leave progress of geometry validatation at 100%
- move coordinate capture to vector menu
more nodetool speedups & refactoring (fixes #4523)
[API] introduce signal QgsVectorLayer::geometryChanged() signal and use that
to reduce the need to reload the modified geometry.
History
#1
Updated by Marco Hugentobler almost 13 years ago
- Assignee deleted (
Marco Hugentobler)
Most of the time is spent for validating the geometries. We discussed the possibility of having an option for turning those checks off.
#2
Updated by Martin Dobias almost 13 years ago
Actually we could remove the validation procedures from QGIS and use GEOSIsValidDetail from GEOS (available from version 3.3). The advantage is that it would be (much) faster, the disadvantage is that only the first problem would be reported - probably not such a big deal?
Anyway also without the validation there are further speed problems - redrawing of the editing markers etc.
#3
Updated by Giovanni Manghi almost 13 years ago
Martin Dobias wrote:
Actually we could remove the validation procedures from QGIS and use GEOSIsValidDetail from GEOS (available from version 3.3). The advantage is that it would be (much) faster, the disadvantage is that only the first problem would be reported - probably not such a big deal?
Anyway also without the validation there are further speed problems - redrawing of the editing markers etc.
Hi Martin and Marco,
Please do whatever it is possible to do about this issue. Recently we noticed that QGIS slowed a lot when editing, even with not that much complex geometries, kind of a showstopper for who needs to vector editing. In general this was a issue also before the recent regression.
Thanks in advance
#4
Updated by Giovanni Manghi almost 13 years ago
- Priority changed from Normal to High
#5
Updated by Giovanni Manghi over 12 years ago
- Target version set to Version 1.7.4
#6
Updated by Giovanni Manghi over 12 years ago
- Crashes QGIS or corrupts data set to No
- Affected QGIS version set to master
I would consider this a blocking issue for any future major release of QGIS.
#7
Updated by Jürgen Fischer over 12 years ago
- % Done changed from 0 to 100
- Status changed from Open to Closed
Fixed in changeset e6167d2424cede3b2c06a19bc478f68ac02f4c44.
#8
Updated by Giovanni Manghi over 12 years ago
Hi Jurgen,
thanks for looking into this issue!
I have just compiled and I have seen the new option "validate geometries". I have set it to "off" but the result it doesn't seem to change much, at least with the provided sample vector. It is necessary to set something else?
Thanks in advance.
#9
Updated by Jürgen Fischer over 12 years ago
Giovanni Manghi wrote:
I have just compiled and I have seen the new option "validate geometries". I have set it to "off" but the result it doesn't seem to change much, at least with the provided sample vector. It is necessary to set something else?
As Martin mentioned validation was not the only issue. And apparently using GEOSisValidDetail isn't much faster than our internal validation (at least not for the same file above). Drawing of the vertex markers is also expensive.
#10
Updated by Giovanni Manghi over 12 years ago
- Status changed from Closed to Open
As Martin mentioned validation was not the only issue. And apparently using GEOSisValidDetail isn't much faster than our internal validation (at least not for the same file above). Drawing of the vertex markers is also expensive.
Hi Jurgen,
when the ticket was filed there were problems with vectors not really that big/complex. Since then the overall situation got much better, but I'm not sure if is as good as in the past (until qgis 1.4 and maybe also 1.5), nevertheless now editing it is again not an issue in most of the cases.
While visualisation performances are not an issue any more (I will close #1978), there are still problems editing, with the node tool, big/complex vectors like
http://www.iucnredlist.org/spatial-data/MAMMALS_TERRESTRIAL.zip
but I understand is kind of an uncommon case (it is 650MB of many complex, overlapped polygons).
More interesting seems to be the vector linked in this ticket, it is just 18MB and is made of a very few complex multipart polygons. This case is not that uncommon especially for its size/complexity.
#11
Updated by Jürgen Fischer over 12 years ago
- Status changed from Open to Feedback
a753fb05 has some more improvements and should speed up things as only the visible vertex markers are generated and renderered. Please test and leave feedback.
#12
Updated by Giovanni Manghi over 12 years ago
Jürgen Fischer wrote:
a753fb05 has some more improvements and should speed up things as only the visible vertex markers are generated and renderered. Please test and leave feedback.
Hi Jurgen,
there was really an improvement, now QGIS does not freeze/hangs any more when using the node tool on the provided vector, but selecting/moving nodes is still a very slow operation, many seconds just too select a specific node, many seconds when moving it, depending on how many nodes the geometry has.
I made a quick test and I noticed that if the geometry being edited has 40k/50k nodes editing is already a bit slow but still completely usable. With 80k/100k nodes the node tool it is already barely usable (at least not usable for a real life use).
Would be better to test this limits on a more powerful machine (I used a i3 processor with 2gb of RAM on 64bit Linux) as I guess we can assume that such complex/big geometries are usually edited especially by power users, with powerful machines.
I don't know if are consequences of this commits, but now I see two issues:
*) I cannot select any more more than one node with the node tool and the ctrl key
*) Selecting a node with the node tool in a point layer causes QGIS to crash
I will file tickets for this issues.
#13
Updated by Jürgen Fischer over 12 years ago
- Status changed from Feedback to Closed
Fixed in changeset 21f9dcd909fe8cd09cd3dee4d6530af9bb5a522d.
#14
Updated by Pietro Rossin over 12 years ago
Hello
I just made a test with the 18Mb shp file (forest), both with 1.7.3 and 1.9.9.
My pc is a not so old workstation biprocessor (2x opteron 252 - 2600Mhz) 4Gb ram, Nvidia quadro fx4000, windows xp 32bit.
Qgis completely freezes on editing nodes, even if zooming in a lot.
bie
pietro
#15
Updated by Paolo Cavallini over 12 years ago
Please add revision number for 1.9.9
Thanks.
#16
Updated by Pietro Rossin over 12 years ago
QGIS version
1.9.90-Alpha
QGIS code revision
ffa2cfd
pietro
#17
Updated by Jürgen Fischer over 12 years ago
#18
Updated by Pietro Rossin over 12 years ago
Just upgraded to d04bc8f
Now it doesn't freeze, it's still slow but it works.
pietro
#19
Updated by Giovanni Manghi over 12 years ago
- Target version changed from Version 1.7.4 to Version 1.8.0
- File arcmap_editing_slowvector.7z added
- Status changed from Closed to Open
- Crashes QGIS or corrupts data changed from No to Yes
In my Windows testing machine QGIS-master still freezes when selecting a specific node with the node tool. The same happens on other machines of others users I'm asking to test. A user sent me a screencast (attached) that shows the editing of this vector in Arcmap, indeed a bit slow, but completely functional.
#20
Updated by Jürgen Fischer over 12 years ago
- Status changed from Open to Closed
Fixed in changeset 9f4996fc210eaa8c2495c912bc7214d37256ea63.
#21
Updated by Giovanni Manghi over 12 years ago
Thanks Jurgen, it works like a charm now.