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/chore: optimize plot queries and visit command #4600

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

PierreSchwang
Copy link
Member

@PierreSchwang PierreSchwang commented Feb 22, 2025

Description

  • Allow streaming of plots in PlotQuery to early return / short-circuiting where applicable
  • Don't duplicate queries in /visit to remove overhead

Submitter Checklist

  • Make sure you are opening from a topic branch (/feature/fix/docs/ branch (right side)) and not your main branch.
  • Ensure that the pull request title represents the desired changelog entry.
  • New public fields and methods are annotated with @since TODO.
  • I read and followed the contribution guidelines.

@github-actions github-actions bot added chore Feature This PR proposes a new feature labels Feb 22, 2025

@Override
public boolean accepts(final @NonNull Plot plot) {
return plot.isBasePlot() && plot.getOwners().size() > 0 && plot.getOwners().contains(owner);
return plot.isBasePlot() && plot.isOwner(owner);
Copy link
Member Author

Choose a reason for hiding this comment

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

the current Plot#getOwners#contains takes server-plots into account (so, if the server uuid is passed into this filter, and a plot is server owned, this filter would return true). Plot#isOwner uses Plot#getOwnerAbs and therefor would not produce the same result. Haven't seen an occurrence of a server plot being queried - not sure if this should just be changed either tbh

@PierreSchwang PierreSchwang force-pushed the feat/chore/plotQueryAndVisit branch from 56a5bd6 to 9c64c2e Compare February 23, 2025 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Feature This PR proposes a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant