Skip to content
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

Field Calculator, slow performance with 2.1.0-104 #17922

Closed
qgib opened this issue Jan 9, 2014 · 21 comments
Closed

Field Calculator, slow performance with 2.1.0-104 #17922

qgib opened this issue Jan 9, 2014 · 21 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats)

Comments

@qgib
Copy link
Contributor

qgib commented Jan 9, 2014

Author Name: joe larson (@oeon)
Original Redmine Issue: 9315
Affected QGIS version: master
Redmine category:vectors
Assignee: Matthias Kuhn


using OSGeo4W64, 2.1.0-104 while trying to update a field in a large dataset (~300MB) with the Field Calculator ...very slow performance was experienced.

Another user in IRC, lrssvt also confirmed experiencing this with this dataset (CARTO1_Lin_6CNivelD.zip) available here #17441-23


Related issue(s): #18100 (relates), #18109 (relates)
Redmine related issue(s): 9509, 9519


@qgib
Copy link
Contributor Author

qgib commented Jan 9, 2014

Author Name: joe larson (@oeon)


This only occurs when Attribute Table is open.


  • operating_system was changed from Windows 7 to Windows
  • os_version was changed from to 7

@qgib
Copy link
Contributor Author

qgib commented Jan 9, 2014

Author Name: Nathan Woodrow (@NathanW2)


  • assigned_to_id was configured as Matthias Kuhn

@qgib
Copy link
Contributor Author

qgib commented Jan 9, 2014

Author Name: Jürgen Fischer (@jef-n)


Fixed in changeset "ccde424dc14ebc82c97e62d3568b1cf15f3bfda9".


  • status_id was changed from Open to Closed

@qgib
Copy link
Contributor Author

qgib commented Jan 9, 2014

Author Name: Matthias Kuhn (@m-kuhn)


I've noticed a similar latency recently, but in a release build (i.e. without debug output, so Jürgens commits should not make any differece there). Adding a new calculated column to ~1mio rows was incredibly slow. This was with a build from before the recent changes concerning reliable signalling of attribute changes. I hope to get time to looking into batch updating.

@qgib
Copy link
Contributor Author

qgib commented Jan 13, 2014

Author Name: dr - (dr -)


Also noticed that slow performance occurs only when Attribute Table is open (master, Ubuntu).


  • operating_system was changed from Windows to
  • status_id was changed from Closed to Reopened
  • os_version was changed from 7 to

@qgib
Copy link
Contributor Author

qgib commented Jan 26, 2014

Author Name: Giovanni Manghi (@gioman)


dr - wrote:

Also noticed that slow performance occurs only when Attribute Table is open (master, Ubuntu).

confirmed very slow field calculator performance when table is open.


  • category_id was configured as Vectors
  • fixed_version_id was configured as Future Release - High Priority

@qgib
Copy link
Contributor Author

qgib commented Jan 26, 2014

Author Name: Matthias Kuhn (@m-kuhn)


Is it a regression?

@qgib
Copy link
Contributor Author

qgib commented Jan 26, 2014

Author Name: Giovanni Manghi (@gioman)


Matthias Kuhn wrote:

Is it a regression?

it seems faster in qgis 2.0.1

@qgib
Copy link
Contributor Author

qgib commented Jan 26, 2014

Author Name: Matthias Kuhn (@m-kuhn)


I could (partially) revert 5c38775 which could probably help here. But this would in turn reintroduce bug #17882 (updates not pushed to the attribute table)
In the future I would like to have a solution which solves both. For now somebody has to decide, what is more important (or agree on e.g. a threshold feature count for which live-propagating will be turned on/off)

http://lists.osgeo.org/pipermail/qgis-developer/2014-January/030018.html

@qgib
Copy link
Contributor Author

qgib commented Jan 29, 2014

Author Name: Giovanni Manghi (@gioman)


Matthias Kuhn wrote:

I could (partially) revert 5c38775 which could probably help here. But this would in turn reintroduce bug #17882 (updates not pushed to the attribute table)
In the future I would like to have a solution which solves both. For now somebody has to decide, what is more important (or agree on e.g. a threshold feature count for which live-propagating will be turned on/off)

http://lists.osgeo.org/pipermail/qgis-developer/2014-January/030018.html

personally if I have to choose I would prefer speed (in table edits) rather than #17882 fixed.

@qgib
Copy link
Contributor Author

qgib commented Jan 30, 2014

Author Name: Matthias Kuhn (@m-kuhn)


I have created a branch which could potentially fix both issues, but I did not have any time at all to test it.

If somebody is able to test this and give a feedback... It would be great to have these things solved, but didn't even dare to create a pull request so far.

https://github.com/matthias-kuhn/QGIS/tree/tblspeed

@qgib
Copy link
Contributor Author

qgib commented Jan 30, 2014

Author Name: Matthias Kuhn (@m-kuhn)


Fixed in changeset "d378f942a50ad25cc24570e125ea3724e09d79d6".


  • status_id was changed from Reopened to Closed

@qgib
Copy link
Contributor Author

qgib commented Jan 30, 2014

Author Name: Matthias Kuhn (@m-kuhn)


My propsed fix was based on wrong assumptions, the main reason for the bad performance was not the fix for #17882 but another change introduced for the relations, which led to tons of unnecessary requests. Fixing that brought back an acceptable speed and the proposed fix implemented this morning gave another remarkable speed boost.

Please help testing thiese fixes and report any related bugs or reopen if this issue should still not be solved for any reason.


  • status_id was changed from Closed to Reopened

@qgib
Copy link
Contributor Author

qgib commented Jan 30, 2014

Author Name: Matthias Kuhn (@m-kuhn)


  • status_id was changed from Reopened to Closed

@qgib
Copy link
Contributor Author

qgib commented Feb 1, 2014

Author Name: Salvatore Larosa (@slarosa)


Hi Matthias,
I just noticed that with large shapefiles (over ~70k features)
when turn off the edit mode and you choose "close without saving" QGIS freezes (not crashes).

@qgib
Copy link
Contributor Author

qgib commented Feb 2, 2014

Author Name: Giovanni Manghi (@gioman)


Salvatore Larosa wrote:

Hi Matthias,
I just noticed that with large shapefiles (over ~70k features)
when turn off the edit mode and you choose "close without saving" QGIS freezes (not crashes).

Hi Matthias and Salvatore,

are the fixes already committed in master or to test I have to use Matthias branch?

thanks!

@qgib
Copy link
Contributor Author

qgib commented Feb 2, 2014

Author Name: Salvatore Larosa (@slarosa)


Giovanni Manghi wrote:

are the fixes already committed in master or to test I have to use Matthias branch?

Yes, they are in master branch now.

@qgib
Copy link
Contributor Author

qgib commented Feb 7, 2014

Author Name: Giovanni Manghi (@gioman)


Salvatore Larosa wrote:

Hi Matthias,
I just noticed that with large shapefiles (over ~70k features)
when turn off the edit mode and you choose "close without saving" QGIS freezes (not crashes).

very true, when discarding edits it take ages to exit the freeze state.

@qgib
Copy link
Contributor Author

qgib commented Feb 9, 2014

Author Name: Matthias Kuhn (@m-kuhn)


I noticed the same. This is due to the undo operation requesting all the features in single requests AFAICT.

Please note that this also happens with the attribute table closed and should therefore be treated as a separate issue.

See #18109

@qgib
Copy link
Contributor Author

qgib commented Feb 9, 2014

Author Name: Jürgen Fischer (@jef-n)


Matthias Kuhn wrote:

Please note that this also happens with the attribute table closed and should therefore be treated as a separate issue.

See #18109

Giovanni already filed #18100.

@qgib
Copy link
Contributor Author

qgib commented Aug 7, 2017

Author Name: Jürgen Fischer (@jef-n)


  • description was changed from using OSGeo4W64, 2.1.0-104 while trying to update a field in a large dataset (~300MB) with the Field Calculator ...very slow performance was experienced.

Another user in IRC, lrssvt also confirmed experiencing this with this dataset (CARTO1_Lin_6CNivelD.zip) available here https://issues.qgis.org/issues/8725#note-23 to using OSGeo4W64, 2.1.0-104 while trying to update a field in a large dataset (~300MB) with the Field Calculator ...very slow performance was experienced.

Another user in IRC, lrssvt also confirmed experiencing this with this dataset (CARTO1_Lin_6CNivelD.zip) available here #17441 (comment)

  • priority_id was changed from Severe/Regression to Low

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats) labels May 24, 2019
@qgib qgib added this to the Future Release - High Priority milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats)
Projects
None yet
Development

No branches or pull requests

1 participant