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

Use v-once and/or v-memo with submissions table #771

Closed
matthew-white opened this issue Apr 6, 2023 · 2 comments
Closed

Use v-once and/or v-memo with submissions table #771

matthew-white opened this issue Apr 6, 2023 · 2 comments

Comments

@matthew-white
Copy link
Member

v-once and v-memo are mentioned as options for improving performance on this page. The documentation for v-memo says:

v-memo is provided solely for micro optimizations in performance-critical scenarios and should be rarely needed. The most common case where this may prove helpful is when rendering large v-for lists (where length > 1000)

The submissions table seems like a good example of that case.

That said, I've already reduced the reactivity of the submission requestData. That means that the submission row components already have very few reactive dependencies. If there is limited reactivity already, would v-once and v-memo have any additional benefit? My guess is yes, because even if the submission requestData is minimally reactive, the component props are still reactive: the submission row components don't know that they're used within a context that guarantees that their props are immutable.

@matthew-white matthew-white self-assigned this Apr 6, 2023
@github-project-automation github-project-automation bot moved this to 🕒 backlog in ODK Central Apr 6, 2023
@matthew-white matthew-white removed their assignment Nov 28, 2023
@matthew-white matthew-white added the refactor Improves code without altering behavior label Nov 10, 2024
@matthew-white
Copy link
Member Author

We're planning to add pagination to the submissions table, which should help a lot with performance. I'm going to go ahead and close this issue. We can always reopen it if there are issues with performance after pagination is introduced.

@matthew-white matthew-white closed this as not planned Won't fix, can't repro, duplicate, stale Nov 10, 2024
@github-project-automation github-project-automation bot moved this from 🕒 backlog to ✅ done in ODK Central Nov 10, 2024
@matthew-white
Copy link
Member Author

the submission row components don't know that they're used within a context that guarantees that their props are immutable.

As of #1043, it's no longer the case that the props of SubmissionMetadataRow are immutable: the awaitingResponse prop will change after the delete button is clicked.

@github-project-automation github-project-automation bot moved this to 🕒 backlog in ODK Central Nov 10, 2024
@matthew-white matthew-white added performance and removed refactor Improves code without altering behavior labels Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant