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

Only load dynamic preload data when needed #5823

Merged
merged 2 commits into from
Dec 7, 2023

Conversation

seadowg
Copy link
Member

@seadowg seadowg commented Nov 6, 2023

Closes #5620
Blocked by #5665
Blocked by getodk/javarosa#733

Uses the newly added XFormParser.XPathProcessor to detect pulldata or search in forms and only if they are present create the database needed for them.

Why is this the best possible solution? Were any other approaches considered?

This is a direct follow on from #5665 where most of the structure was defined - all I've done here is integrate XFormParser.XPathProcessor to properly implement DynamicPreloadParseProcessor.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

Users should no longer see the "Pre-loading data from" loading state when opening a form with a secondary instance for the first time unless it contains a pulldata or search function. It'd be good to test forms with and without these functions to check that everything works as expected, and that the first load is now faster for forms that don't include search/pulldata.

Before submitting this PR, please make sure you have:

  • added or modified tests for any new or changed behavior
  • run ./gradlew checkAll and confirmed all checks still pass OR confirm CircleCI build passes and run ./gradlew connectedDebugAndroidTest locally.
  • added a comment above any new strings describing it for translators
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.
  • verified that any new UI elements use theme colors. UI Components Style guidelines

@seadowg seadowg marked this pull request as ready for review December 4, 2023 15:58
@grzesiek2010 grzesiek2010 merged commit 484889e into getodk:master Dec 7, 2023
6 checks passed
@seadowg seadowg deleted the xpathprocessor branch December 8, 2023 10:57
@srujner
Copy link

srujner commented Jan 15, 2024

Tested with Success!

Verified on device with Android 13

Verified cases:

@dbemke
Copy link

dbemke commented Jan 15, 2024

Tested with Success!

Verified on device with Android 10

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.

Only build search/pulldata database for forms that require it
4 participants