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

File based layer edits and posts taking extremely long time #18116

Closed
qgib opened this issue Feb 10, 2014 · 22 comments
Closed

File based layer edits and posts taking extremely long time #18116

qgib opened this issue Feb 10, 2014 · 22 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 Feb 10, 2014

Author Name: Patrick Dunford (@enzedrailmaps)
Original Redmine Issue: 9526
Affected QGIS version: master
Redmine category:vectors


Since I updated to 2.1.0 dev (and also Windows 8.1) from 2.0 and Windows 8, I have noticed the layers I am working on are very slow to either save or go into edit mode or out of edit mode. These are file based layers and usually shp format.

Something that only took literally seconds to happen in 2.0 and earlier developmental editions I have run on my computer will now take at least 10 minutes to occur, while Windows says QGis is "not responding" and its Task Manager shows QGIS is using 51% of the CPU.

During this time QGIS is allocating memory because its total memory is climbing up, so we know something is happening. It goes up in small increments, maybe 4K - 10K. Sometimes more than this. But is extremely slow to happen. Almost like it had to count every single point in this layer (these layers have been points, paths and polygons, so they are all different types of layers) and allocate memory just for that point, then carry on with the next one etc. So far it has been going half an hour and its memory total has increased by 50 MB. I have no inclination to wait and see where it gets to or how long it takes. I'll come back in the morning and see what the final result was and add it as a comment to this. I have attached the layer in question in a Zip file. It is about 19KB. Why does so much memory have to be allocated to edit a shapefile of such a small size.

I don't see this happening with any other kind of file operations on Windows 8.1 so it must presumably be down to QGIS. I can get around the problem by creating a new shapefile and transferring everything into it from the old one. This works for a few days and then I get the same thing popping up again.


@qgib
Copy link
Contributor Author

qgib commented Feb 10, 2014

Author Name: Giovanni Manghi (@gioman)


Can you confirm that on the same machine, the same files and operations are ok with qgis 2.0.1?

tagging as blocker awaiting for feedback.


  • category_id was configured as Vectors
  • status_id was changed from Open to Feedback
  • priority_id was changed from Normal to Severe/Regression
  • fixed_version_id was configured as Version 2.2

@qgib
Copy link
Contributor Author

qgib commented Feb 10, 2014

Author Name: Patrick Dunford (@enzedrailmaps)


OK. So this is what happened. It took over an hour to put the layer into edit mode. And QGIS increased its memory usage by over 100 MB, in order to edit a single layer that occupies around 19 KB of disk space.

Now I don't know why it needs so much memory just to edit a single layer, obviously the delay is down to the extremely slow rate of allocating this much memory for this task.

I needed to transfer a couple of features from this layer to another layer so after cutting them I put the second layer into edit mode. Then the same snail's pace performance is repeated to put the second, equally small layer, into edit mode. Still more many MBs of memory have to be allocated to put this layer into edit mode woth the resulting huge delay.


  • fixed_version_id removed Version 2.2

@qgib
Copy link
Contributor Author

qgib commented Feb 10, 2014

Author Name: Patrick Dunford (@enzedrailmaps)


Reporting on the paste to the second layer, putting the second layer into edit mode required another 30 MB of memory. On the other hand, after pasting the paths into the second layer, taking it out of edit mode took mere seconds to achieve the posts to the layer. Likewise with the first layer, almost instantaneous save and reversion to read only. I have attached the second layer with this update.

After completing both saves and saving the project the memory used by Qgis had not reduced and it is now 144 MB more than before the two layers were edited. Must some big memory leaks going on there?

Will test with the 2.0 revision tonight. This appears to be the production 2.0.1 release -
QGIS version 2.0.1-Dufour QGIS code revision d94c044
Compiled against Qt 4.8.5 Running against Qt 4.8.5
Compiled against GDAL/OGR 1.10.0 Running against GDAL/OGR 1.10.1
Compiled against GEOS 3.4.2-CAPI-1.8.2 Running against GEOS 3.4.2-CAPI-1.8.2 r3921
PostgreSQL Client Version 9.2.4 SpatiaLite Version 4.1.1
QWT Version 5.2.3 PROJ.4 Version 480
QScintilla2 Version 2.7.2

Whereas the 2.1 release I have reports

QGIS version 2.1.0-Master QGIS code revision e3aef43
Compiled against Qt 4.8.5 Running against Qt 4.8.5
Compiled against GDAL/OGR 1.10.1 Running against GDAL/OGR 1.10.1
Compiled against GEOS 3.4.2-CAPI-1.8.2 Running against GEOS 3.4.2-CAPI-1.8.2 r3921
PostgreSQL Client Version 9.2.4 SpatiaLite Version 4.1.1
QWT Version 5.2.3 PROJ.4 Version 480
QScintilla2 Version 2.7.2 This copy of QGIS writes debugging output.


  • fixed_version_id was configured as Version 2.2
  • 6763 was configured as CWMSLFormerSiding.zip

@qgib
Copy link
Contributor Author

qgib commented Feb 10, 2014

Author Name: Richard Duivenvoorde (@rduivenvoorde)


Hi Patrick,

can you confirm that this also is the case when you disable ALL your plugins?

There have been some issues with certain python plugins some time ago, see for example: #17850

You can start QGIS from command line with --noplugins option (or just move your .qgis2 folder for this test).

Hoping that you have one of the older versions of one of the plugins that had this issue, OR maybe you found a new plugin with the same issue.

@qgib
Copy link
Contributor Author

qgib commented Feb 11, 2014

Author Name: Patrick Dunford (@enzedrailmaps)


OK so using 2,01 with the same project and layer files, editing a layer is instantaneous. So are the saves.

I'll give it a few more days of work to see if I get the same problems developing again.

@qgib
Copy link
Contributor Author

qgib commented Feb 16, 2014

Author Name: Giovanni Manghi (@gioman)


Patrick Dunford wrote:

OK so using 2,01 with the same project and layer files, editing a layer is instantaneous. So are the saves.

I'll give it a few more days of work to see if I get the same problems developing again.

I cannot confirm this issue on the latest master (with the provided data and other datasets). Maybe one of the fixes committed in the last days has also fixed this.

@qgib
Copy link
Contributor Author

qgib commented Feb 17, 2014

Author Name: Patrick Dunford (@enzedrailmaps)


Testing with the --noplugins option but haven't done enough on it yet to see if fixed. Haven't tried latest master (could be a plugin yet)

@qgib
Copy link
Contributor Author

qgib commented Feb 18, 2014

Author Name: Giovanni Manghi (@gioman)


Patrick Dunford wrote:

Testing with the --noplugins option but haven't done enough on it yet to see if fixed. Haven't tried latest master (could be a plugin yet)

have you tested the latest master release?

@qgib
Copy link
Contributor Author

qgib commented Feb 18, 2014

Author Name: Patrick Dunford (@enzedrailmaps)


At the moment I'm running 141 noplugins. Might try it tonight with plugins enabled.

@qgib
Copy link
Contributor Author

qgib commented Feb 18, 2014

Author Name: Giovanni Manghi (@gioman)


Patrick Dunford wrote:

At the moment I'm running 141 noplugins. Might try it tonight with plugins enabled.

the important is to try also the latest master release that you can install with the osgeo4w installer.

@qgib
Copy link
Contributor Author

qgib commented Feb 19, 2014

Author Name: Patrick Dunford (@enzedrailmaps)


141 is the latest master.

@qgib
Copy link
Contributor Author

qgib commented Feb 19, 2014

Author Name: Giovanni Manghi (@gioman)


Patrick Dunford wrote:

141 is the latest master.

ok, then it is solved for you or not? cheers!

@qgib
Copy link
Contributor Author

qgib commented Feb 22, 2014

Author Name: Patrick Dunford (@enzedrailmaps)


I'm happy with it for now. I've been using it for a few days and haven't seen a repeat of the problem.


  • status_id was changed from Feedback to Closed

@qgib
Copy link
Contributor Author

qgib commented Feb 22, 2014

Author Name: Giovanni Manghi (@gioman)


  • resolution was changed from to fixed/implemented

@qgib
Copy link
Contributor Author

qgib commented Feb 22, 2014

Author Name: Patrick Dunford (@enzedrailmaps)


I think it's still happening, just not as extreme (yet). Taking 4 minutes to put a layer into edit mode and using 12 MB of memory (for a 32KB shapefile layer) could still be an issue.


  • status_id was changed from Closed to Reopened

@qgib
Copy link
Contributor Author

qgib commented Feb 22, 2014

Author Name: Patrick Dunford (@enzedrailmaps)


OK so I finished editing the two layers (25KB and 32KB, shapefile, file based layer) then hit Save All and waited for 15 minutes and qgis-dev.exe increased its memory usage by 40 MB.

If it's plugins, what is the difference between "installed" and "activated"? What does "--noplugins" do in terms of "installed" and "activated"?

@qgib
Copy link
Contributor Author

qgib commented Feb 22, 2014

Author Name: Giovanni Manghi (@gioman)


Patrick Dunford wrote:

OK so I finished editing the two layers (25KB and 32KB, shapefile, file based layer) then hit Save All and waited for 15 minutes and qgis-dev.exe increased its memory usage by 40 MB.

can you please attach a sample project and data? A list of the 3rd party plugins you have installed would be useful too.

If it's plugins, what is the difference between "installed" and "activated"? What does "--noplugins" do in terms of "installed" and "activated"?

once installed a plugin can be active (loaded on qgis startup) or not. The --noplugins switch allow you to run qgis without loading any plugin on startup (even if you have them active in the plugin manager).


  • resolution was changed from fixed/implemented to
  • status_id was changed from Reopened to Feedback

@qgib
Copy link
Contributor Author

qgib commented Mar 3, 2014

Author Name: Giovanni Manghi (@gioman)


Giovanni Manghi wrote:

Patrick Dunford wrote:

OK so I finished editing the two layers (25KB and 32KB, shapefile, file based layer) then hit Save All and waited for 15 minutes and qgis-dev.exe increased its memory usage by 40 MB.

can you please attach a sample project and data? A list of the 3rd party plugins you have installed would be useful too.

If it's plugins, what is the difference between "installed" and "activated"? What does "--noplugins" do in terms of "installed" and "activated"?

once installed a plugin can be active (loaded on qgis startup) or not. The --noplugins switch allow you to run qgis without loading any plugin on startup (even if you have them active in the plugin manager).

closing for lack of feedback, reopen if necessary.


  • resolution was changed from to worksforme
  • status_id was changed from Feedback to Closed

@qgib
Copy link
Contributor Author

qgib commented Sep 5, 2014

Author Name: Patrick Dunford (@enzedrailmaps)


The problem plugin seems to be the Rectangles Ovals plugin. I just updated to 2.4.0 and have just reinstalled the version of the layer that was available from the plugins repository. Up until now I have had two shortcuts, one for starting Qgis without plugins and one with plugins, as this is the only plugin I use most of the time.

@qgib
Copy link
Contributor Author

qgib commented Nov 27, 2015

Author Name: Patrick Dunford (@enzedrailmaps)


This is still an occurrence in 2.10
Is there any progress on this issue?


  • status_id was changed from Closed to Reopened
  • fixed_version_id removed Version 2.2

@qgib
Copy link
Contributor Author

qgib commented Nov 27, 2015

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


Patrick Dunford wrote:

This is still an occurrence in 2.10
Is there any progress on this issue?

Check 2.12 or 2.8 (LTR). 2.10 is not maintained. But it this is actually a problem with the "Rectangle Ovals" plugin you should probably file a ticket there.


  • status_id was changed from Reopened to Feedback

@qgib
Copy link
Contributor Author

qgib commented Nov 29, 2015

Author Name: Giovanni Manghi (@gioman)


Why reopening if is a 3rd party plugin issue? Reopen it if there is any evidence that is a QGIS core issue, otherwise report the issue to the plugin author. Thanks!


  • status_id was changed from Feedback to Closed

@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 closed this as completed May 24, 2019
@qgib qgib mentioned this issue May 25, 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