diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-04-17 22:37:16 +0300 |
---|---|---|
committer | Backportbot <backportbot-noreply@rullzer.com> | 2019-04-24 10:01:56 +0300 |
commit | 10aeef97868fc74017ef68e09db0f001e3f7ce11 (patch) | |
tree | d4f1d32b052fa917397241c57bd8aaf49b9d1abe /apps | |
parent | 7d5ab15ac076d980c04f31d07e6b2fbee11b3ff4 (diff) |
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>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/CustomPropertiesBackend.php | 7 | ||||
-rw-r--r-- | apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php | 4 |
2 files changed, 0 insertions, 11 deletions
diff --git a/apps/dav/lib/Connector/Sabre/CustomPropertiesBackend.php b/apps/dav/lib/Connector/Sabre/CustomPropertiesBackend.php index c77a4d6be48..f3f685a8b9e 100644 --- a/apps/dav/lib/Connector/Sabre/CustomPropertiesBackend.php +++ b/apps/dav/lib/Connector/Sabre/CustomPropertiesBackend.php @@ -129,13 +129,6 @@ class CustomPropertiesBackend implements BackendInterface { return; } - if ($node instanceof Directory - && $propFind->getDepth() !== 0 - ) { - // note: pre-fetching only supported for depth <= 1 - $this->loadChildrenProperties($node, $requestedProps); - } - $props = $this->getProperties($node, $requestedProps); foreach ($props as $propName => $propValue) { $propFind->set($propName, $propValue); diff --git a/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php b/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php index 91973eeff5d..3b7bd859b9f 100644 --- a/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php @@ -226,10 +226,6 @@ class CustomPropertiesBackendTest extends \Test\TestCase { ->method('getPath') ->will($this->returnValue('/dummypath/test.txt')); - $rootNode->expects($this->once()) - ->method('getChildren') - ->will($this->returnValue(array($nodeSub))); - $this->tree->expects($this->at(0)) ->method('getNodeForPath') ->with('/dummypath') |