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

perf: only load user state when showing full user data #50

Merged
merged 2 commits into from
May 20, 2024

Conversation

SychO9
Copy link
Contributor

@SychO9 SychO9 commented Mar 8, 2024

Fof terms only needs the serialized state for the modal to see if a user accepted, this can be optimized by lazy loading the full user data from the modal.

The other attributes are only needed for the current user serialization.

This prevents unnecessary querying of the terms state when serializing discussion & post authors in other endpoints. Solves a massive slowdown with big data.

@imorland imorland merged commit 4be7499 into FriendsOfFlarum:master May 20, 2024
6 checks passed
imorland added a commit that referenced this pull request Jun 16, 2024
imorland added a commit that referenced this pull request Jun 16, 2024
@imorland
Copy link
Member

@SychO9 I've reverted this change for now due to https://discuss.flarum.org/d/11714-fof-terms-ask-your-users-to-accept-tos-and-privacy-policy/177

Could you please take a look at this and submit a new PR when possible? Thanks

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.

3 participants