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

Reduce the number of cache operations for dav operations #1054

Merged
merged 4 commits into from
Aug 27, 2016

Conversation

icewind1991
Copy link
Member

  • Reuse fileinfo from userfolder when possible
  • cache root id in mountpoint
  • cache userfolder in root
  • optimize getUserFolder for the common case where the user is already setup

Reduces the number of cache operations done for the most basic (and common) dav operation (propfind with depth:0 on the root) from 7 to 2

@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Aug 25, 2016
@icewind1991 icewind1991 added this to the Nextcloud 11.0 milestone Aug 25, 2016
@@ -124,6 +125,9 @@ protected function setUp() {
call_user_func([$this, $methodName]);
}
}


\OC::$server->getRootFolder()->clearCache();
Copy link
Member

Choose a reason for hiding this comment

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

This causes a setupFS() on each test case, even when the test doesn't even use anything from the file system. Shouldn't the call in OC_Util::tearDownFS() be enough?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch, fixed

@rullzer
Copy link
Member

rullzer commented Aug 26, 2016

Nice catch. I doesn't read very easy currently. but that is mainy because of the rest of the code around it.

👍

@LukasReschke
Copy link
Member

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants