https://issues.qgis.org/https://issues.qgis.org/favicon.ico2015-04-25T11:11:15ZQGIS Issue TrackingQGIS Application - Bug report #12629: Vector Layer TranslateFeatures performance (2.8.1 vs 1.8.0)https://issues.qgis.org/issues/12629?journal_id=606152015-04-25T11:11:15ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Category</strong> set to <i>Python plugins</i></li><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li></ul><p>please post this question also on the developers mailing list.</p> QGIS Application - Bug report #12629: Vector Layer TranslateFeatures performance (2.8.1 vs 1.8.0)https://issues.qgis.org/issues/12629?journal_id=607192015-04-29T03:28:35ZMatthias Kuhn
<ul></ul><p>Can you check if it helps to group it in a single undo command.<br />I.e. compare the result of the following two snippets</p>
<p>Grouped:<br /><pre>
from timeit import *
def funct():
vlayer = iface.activeLayer()
u = QgsVectorLayerEditUtils( vlayer )
vlayer.beginEditCommand( 'Translate' )
for f in vlayer.getFeatures():
f.id()
u.translateFeature(fid, delta_x, delta_y)
vlayer.endEditCommand()
t = Timer(stmt=funct)
print t.timeit(number = 5 )
</pre></p>
<p>Ungrouped:<br /><pre>
from timeit import *
def funct():
vlayer = iface.activeLayer()
u = QgsVectorLayerEditUtils( vlayer )
for f in vlayer.getFeatures():
f.id()
u.translateFeature(fid, delta_x, delta_y)
t = Timer(stmt=funct)
print t.timeit(number = 5 )
</pre></p> QGIS Application - Bug report #12629: Vector Layer TranslateFeatures performance (2.8.1 vs 1.8.0)https://issues.qgis.org/issues/12629?journal_id=607222015-04-29T03:37:27ZMatthias Kuhn
<ul></ul><p>You can also play with the following snippet:</p>
<pre>
vlayer.getFeatures( QgsFeatureRequest().setSubsetOfAttributes([]) )
</pre> QGIS Application - Bug report #12629: Vector Layer TranslateFeatures performance (2.8.1 vs 1.8.0)https://issues.qgis.org/issues/12629?journal_id=610542015-05-12T22:49:59Zjopan -jopan@foo.bar
<ul></ul><p>Firstly I posted this question on the Qgis developers mailing list.</p>
<p>Secondly I tried to play with "grouped"/"ungrouped" and "QgsFeatureRequest().setSubsetOfAttributes([])" but the situation didn't change. The first translation in version 2.8.1 still lasted 4 minutes.</p> QGIS Application - Bug report #12629: Vector Layer TranslateFeatures performance (2.8.1 vs 1.8.0)https://issues.qgis.org/issues/12629?journal_id=665032015-12-20T06:49:55ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Open</i></li></ul> QGIS Application - Bug report #12629: Vector Layer TranslateFeatures performance (2.8.1 vs 1.8.0)https://issues.qgis.org/issues/12629?journal_id=781192017-04-30T23:07:20ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Regression?</strong> set to <i>No</i></li><li><strong>Easy fix?</strong> set to <i>No</i></li></ul> QGIS Application - Bug report #12629: Vector Layer TranslateFeatures performance (2.8.1 vs 1.8.0)https://issues.qgis.org/issues/12629?journal_id=1021452019-03-09T14:12:33ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Resolution</strong> set to <i>end of life</i></li><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>End of life notice: QGIS 2.18 LTR</p>
<p>Source:<br /><a class="external" href="http://blog.qgis.org/2019/03/09/end-of-life-notice-qgis-2-18-ltr/">http://blog.qgis.org/2019/03/09/end-of-life-notice-qgis-2-18-ltr/</a></p>