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

Make deltas prepared for cloud projects play nicely with tracking features #4599

Merged
merged 4 commits into from
Oct 3, 2023

Conversation

nirvn
Copy link
Member

@nirvn nirvn commented Sep 25, 2023

This PR attempts to avoid excessively large delta file (and changes count) being uploaded to QFieldCloud for vector layer features being used in tracking sessions.

The logic goes as follows: if a feature being updated is confirmed by the tracking model as part of an ongoing tracking session, new code attempts to find a geometry-only patch; if we find one, we update the new geometry with the latest geometry from the current tracking session.

This makes the cloud experience tracker-friendly while not disrupting any logic on non-tracked features/layers.

The logic goes as follows: if a feature being updated had a previous patch inserted into the deltas, we update that patch with the latest geometry/attribute changes. A few benefits from this approach include:

  • reduced size of the deltas json file being uploaded to the cloud
  • a reduced list of changes being listed in the cloud project (easier for admin to review, etc.)
  • a few cloud CPU cycles saved by having reduced number of changes to process, which means in theory a faster experience

@suricactus , @m-kuhn , as discussed yesterday.

@GuyGeneau , this should help with the issue you filed here (#4578).

@qfield-fairy
Copy link
Collaborator

qfield-fairy commented Sep 25, 2023

@nirvn
Copy link
Member Author

nirvn commented Oct 1, 2023

@suricactus , tests added.

Copy link
Collaborator

@suricactus suricactus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@nirvn nirvn merged commit 0c1d466 into master Oct 3, 2023
19 checks passed
@nirvn nirvn deleted the cloud_tracking_friendly branch October 3, 2023 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants