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

make Node::getParent lazy #38150

Merged
merged 5 commits into from Sep 5, 2023
Merged

make Node::getParent lazy #38150

merged 5 commits into from Sep 5, 2023

Conversation

icewind1991
Copy link
Member

Since we know the parent exists and we have some basic metadata already, a lazy folder can be enough is some cases.

Main motivation is allow getting the parent it without extra db queries using $node->getParent()->getId().

@icewind1991 icewind1991 marked this pull request as ready for review August 14, 2023 19:15
@icewind1991 icewind1991 force-pushed the lazy-folder-parent branch 5 times, most recently from fb4fc52 to c9b42f4 Compare August 15, 2023 10:12
@icewind1991
Copy link
Member Author

icewind1991 commented Aug 15, 2023

Also made LazyFolder::getFullPath and LazyFolder::get not get the real folder if the path is known

@icewind1991 icewind1991 requested review from a team and blizzz and removed request for a team August 15, 2023 14:11
lib/private/Files/Node/LazyFolder.php Outdated Show resolved Hide resolved
lib/public/Files/FileInfo.php Outdated Show resolved Hide resolved
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 2. developing Work in progress labels Sep 5, 2023
@skjnldsv skjnldsv merged commit 7ee34a3 into master Sep 5, 2023
40 checks passed
@skjnldsv skjnldsv deleted the lazy-folder-parent branch September 5, 2023 06:33
@artonge
Copy link
Contributor

artonge commented Sep 6, 2023

There is a breaking change in the FileInfo interface, has this been reported somewhere ?

@come-nc come-nc added the pending documentation This pull request needs an associated documentation update label Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement pending documentation This pull request needs an associated documentation update performance 🚀
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants