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

feat(TableViewDriver): allow lightweightDiffing #219

Merged
merged 1 commit into from
Nov 16, 2023
Merged

Conversation

nickell-andrew
Copy link
Contributor

@nickell-andrew nickell-andrew commented Nov 13, 2023

Changes in this pull request

  • add optional lightweightDiffing option for use with very large but largely static lists
    Issue fixed: #

For forms we found that performance is massively better with automatic diffing disabled for large forms. Unfortunately, doing a full reload of tableview data causes text fields to resign focus which is a bad experience for end users.
Lightweight diffing is an option I'd like to explore for forms since we don't frequently add/remove/move sections/cells.

Checklist

  • I added an entry to the CHANGELOG.md for any breaking changes, enhancements, or bug fixes.
  • I have reviewed the contributing guide

@nickell-andrew nickell-andrew marked this pull request as ready for review November 15, 2023 23:49
@nickell-andrew nickell-andrew requested a review from a team as a code owner November 15, 2023 23:49
self._tableViewModel = newModel
self._tableViewModel = newModel
if old == new {
self.refreshViews(refreshContext: .contentOnly)
} else {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

New behavior is opt in for folks that set automaticDiffing to true and also set the new parameter lightweightDiffing to true.

@njw438 njw438 merged commit c996bf7 into master Nov 16, 2023
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants