Skip to content

[2.x] perf(tags): prevent loading tag state if loaded previously#4009

Merged
SychO9 merged 1 commit intoflarum:2.xfrom
rafaucau:fix/2.0-tag-stage-user
Sep 20, 2024
Merged

[2.x] perf(tags): prevent loading tag state if loaded previously#4009
SychO9 merged 1 commit intoflarum:2.xfrom
rafaucau:fix/2.0-tag-stage-user

Conversation

@rafaucau
Copy link
Contributor

This PR is similar to #4008, but targets the 2.x branch.
I have not been able to verify if the issue described in #4007 occurs in 2.x, as the Clockwork extension doesn't work with this version, preventing me from observing database queries. Nevertheless, implementing these changes is a precautionary step that can potentially prevent similar issues in the 2.x branch.

Necessity

  • Has the problem that is being solved here been clearly explained?
  • If applicable, have various options for solving this problem been considered?
  • For core PRs, does this need to be in core, or could it be in an extension?
  • Are we willing to maintain this for years / potentially forever?

Copy link
Member

@luceos luceos left a comment

Choose a reason for hiding this comment

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

The logic looks sound. I thought the conditional could be simplified, but then we would remove the check for the state actually being null. So 👍 all good.

I would have loved to see the benefit of this on the queries though.

@SychO9 SychO9 merged commit e1a77fd into flarum:2.x Sep 20, 2024
@SychO9 SychO9 added this to the 2.0 milestone Sep 20, 2024
@rafaucau rafaucau deleted the fix/2.0-tag-stage-user branch September 20, 2024 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants