Bug report #3371

Random points is terribly slow with complex features

Added by Paolo Cavallini almost 14 years ago. Updated over 7 years ago.

Status:Closed
Priority:Low
Assignee:cfarmer -
Category:Processing/QGIS
Affected QGIS version:master Regression?:
Operating System:All Easy fix?:
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:13431

Description

If random points is applied to a complex shape (I'm taking ITA_adm0, I think from OSM), generating even a few points takes ages, while CPU goes to 100%. With 1 point it takes a few seconds, with 10 it is already very slow, with 1k points I had to force quit. This on a low power machine, 4
cores Intel(R) Atom(TM) CPU N550 @ 1.50GHz.

History

#1 Updated by Giovanni Manghi almost 14 years ago

it takes quite a long also on a much powerful machine... and it is confirmed that it seems to depend on the complexity of the input polygon.

#2 Updated by Borys Jurgiel over 13 years ago

Carson, do you (or somebody) have an idea for any optimalization? If not, I'd close it and wait for move to the analysis lib.

#3 Updated by Paolo Cavallini over 13 years ago

Please do not close it: it causes QGIS to freeze for ages, and users have to kill it, with potential loss of data. You can postpone to 2.0 if you wish.

#4 Updated by Borys Jurgiel over 13 years ago

Ok. Carson, what about threading and a small STOP button (ftools-wide)?

#5 Updated by cfarmer - over 13 years ago

Replying to [comment:4 borysiasty]:

Ok. Carson, what about threading and a small STOP button (ftools-wide)?

This is a possibility, but would likely require a full re-write of the tool. So far only the geometry tools and geoprocessing tools use threading. I will have a look and see what kind of alterations are required... though it is unlikely that I'll have time to implement anything before the next release :-(

Carson

#6 Updated by Giovanni Manghi almost 13 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

#7 Updated by Paolo Cavallini over 12 years ago

  • Affected QGIS version set to master
  • Crashes QGIS or corrupts data set to No
  • Target version changed from Version 1.7.4 to Version 1.8.0

#8 Updated by Paolo Cavallini about 12 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

#9 Updated by Jürgen Fischer over 10 years ago

  • Target version changed from Version 2.0.0 to Future Release - Lower Priority

#10 Updated by Médéric RIBREUX almost 9 years ago

  • % Done changed from 0 to 100
  • Resolution set to fixed/implemented
  • Status changed from Open to Closed
  • Pull Request or Patch supplied set to No

Hello, bug triage...

it takes about 40 seconds to create 1k random points on the polygon of french boundary from OSM with Processing tool "Random points inside polygons (fixed)" and about 60 seconds with fTools Random Points on an core .

I think that the two tools have been optimized (otherwise I would have wait much more time than less than a minute) and I am closing this bug.

#11 Updated by Giovanni Manghi over 7 years ago

The "ftools" category is being removed from the tracker, changing the category of this ticket to "Processing/QGIS" to not leave the category orphaned.

Also available in: Atom PDF