Hi @nirvn,
I’m experiencing a significant performance regression when saving features in QField 4.1.1 compared to versions prior to 4.1 (last confirmed working version: 4.0.5). Saving a feature in the Observacion layer takes approximately 10 seconds in 4.1.6, while the same operation completes in about 1 second in 4.0.5.
Setup:
- QGIS 3.40.11 (desktop)
- QField >=4.1.x (field device, Android)
- PostGIS/PostgreSQL backend, offline editing via QFieldCloud (layers packaged as GeoPackage on device)
Behaviour:
- The delay occurs specifically when pressing the Save button, not while interacting with widgets
- The regression is specific to one layer (
Observacion). Other layers in the same project save instantly - The delay is consistent (~10 seconds) from the very first save after opening the project, regardless of how many features have been saved in that session
Layer characteristics:
The Observacion layer has 76 fields with the following widget distribution: 26 Range, 22 ValueRelation, 10 ValueMap, 10 CheckBox, 7 TextEdit, 1 DateTime.
Extensive troubleshooting already performed — none resolved the issue:
- Rewrote
overlay_nearest()default value expressions to short-circuit eagerly in the majority of cases — no improvement - Removed ALL default value expressions from the layer — no improvement
- Removed ALL constraint expressions from the layer — no improvement
- Removed the layer’s SQL filter (which included a subquery with
now()) — no improvement - Tested a minimal layer with 75 plain
textfields, no expressions, no filters, published via QFieldCloud — save was instant - Tested the same minimal layer with 20 fields configured as ValueRelation widgets pointing to a small lookup table — save was still instant
None of the individual characteristics of the Observacion layer reproduce the issue in isolation. The delay appears to be caused by a combination of factors specific to this layer’s full structure that only manifests in 4.1+.
I was unable to obtain a useful runtime profile from the Message Log, as the ‘Log runtime profile’ button only captures project load state, not the state immediately after a save operation.
I’m attaching the application log captured immediately after a save. Unfortunately I’m unable to share the project file due to confidentiality constraints, but I’m happy to answer any questions about its configuration.
Is there any additional diagnostic information I can provide to help identify the regression introduced between 4.0.5 and 4.1.0?
Thanks for your work on QField.