QGIS icon indicating copy to clipboard operation
QGIS copied to clipboard

Having a default value with apply on update makes edits in form view unbearable slow, affects also field calculator

Open gioman opened this issue 2 years ago • 0 comments

What is the bug or the crash?

I have a PostGIS table that has a few fields and a form created with the D&D designer.

A couple of this fields are decimal, and one is read only and derived/defaulted from the other with a simple formula

round(((6.28*"dap")/2),2)

which is also applied on update:

image

This scenario/configuration has very bad effect: editing fields/changing values in form view (but not in table view) even completely unrelated ones (i.e. a text field) become unbearably slow, with QGIS that seems to make some kind of transaction at each keystroke so entering a few characters/words takes several seconds to show up.

This slowness is also clearly affecting field calculator operations, so when updating a field (again, even unrelated ones to the default value/formula used somewhere else) the operation takes orders of magnitude more time compared to what it takes with "apply default value on updated" checked.

Entering data while adding a new feature/record in form view is not affected. Also not affected is the form in identify dialog, only te one in table form view.

Steps to reproduce the issue

Create a (tested PostGIS) table, with 3 fields: 2 decimal and 1 text.

Make one of the decimal fields automatically computed from the other one, with a whatever formula like "field1"*2

Add a new feature

Open attribute table in form view and update the text field trying to write a sentence, notice the delay at each keystroke.

Versions

3.28.8 and 3.32.0

Supported QGIS version

  • [X] I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

No response

gioman avatar Jul 01 '23 17:07 gioman