Skip to content

Commit 10aeef9

Browse files
rullzerBackportbot
authored andcommitted
Prefetching blows up if there are a lot of files.
I saw instances where people had a lot of files (each with custom properties) and all this prefetching blew up and started to consume an insane amount of RAM resulting in the process getting killed. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
1 parent 7d5ab15 commit 10aeef9

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

apps/dav/lib/Connector/Sabre/CustomPropertiesBackend.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,6 @@ public function propFind($path, PropFind $propFind) {
129129
return;
130130
}
131131

132-
if ($node instanceof Directory
133-
&& $propFind->getDepth() !== 0
134-
) {
135-
// note: pre-fetching only supported for depth <= 1
136-
$this->loadChildrenProperties($node, $requestedProps);
137-
}
138-
139132
$props = $this->getProperties($node, $requestedProps);
140133
foreach ($props as $propName => $propValue) {
141134
$propFind->set($propName, $propValue);

apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,6 @@ public function testGetPropertiesForDirectory() {
226226
->method('getPath')
227227
->will($this->returnValue('/dummypath/test.txt'));
228228

229-
$rootNode->expects($this->once())
230-
->method('getChildren')
231-
->will($this->returnValue(array($nodeSub)));
232-
233229
$this->tree->expects($this->at(0))
234230
->method('getNodeForPath')
235231
->with('/dummypath')

0 commit comments

Comments
 (0)