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

[stable29] perf(sharing): Use getFirstNodeById() which is more performant #12554

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Jun 20, 2024

As we don't care which node we get for rendering the message
As suggested by icewind

πŸ› οΈ API Checklist

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not possible
  • πŸ“˜ API documentation in docs/ has been updated or is not required
  • πŸ”– Capability is added or not needed

@nickvergessen
Copy link
Member Author

/backport to main

$pathSegments = explode('/', $fullPath, 4);
$name = $node->getName();
$size = $node->getSize();
$path = $pathSegments[3] ?? $name;
Copy link
Member

Choose a reason for hiding this comment

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

$userFolder->getRelativePath($fullPath) is the "correct" way to do this.

As we don't care which node we get for rendering the message

Signed-off-by: Joas Schilling <[email protected]>
@nickvergessen nickvergessen force-pushed the perf/noid/get-first-node-by-id branch from 458203d to cd6a472 Compare July 11, 2024 15:57
@nickvergessen nickvergessen enabled auto-merge July 11, 2024 16:10
@nickvergessen nickvergessen changed the title perf(sharing): Use getFirstNodeById() which is more performant [stable29] perf(sharing): Use getFirstNodeById() which is more performant Jul 11, 2024
@nickvergessen nickvergessen merged commit 1d537eb into stable29 Jul 11, 2024
64 checks passed
@nickvergessen nickvergessen deleted the perf/noid/get-first-node-by-id branch July 11, 2024 16:38
@nickvergessen nickvergessen mentioned this pull request Jul 11, 2024
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