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

fix(performance): Do not set up filesystem on every call #36589

Merged
merged 5 commits into from
Feb 20, 2023

Conversation

miaulalala
Copy link
Contributor

@miaulalala miaulalala commented Feb 7, 2023

Removed old OO_FileChunking logic that produced GC- collectable chunks

Added BG Job that will run a garbage collection for every user

Signed-off-by: Anna Larch anna@nextcloud.com

Summary

Comparison for OCS requests:
https://blackfire.io/profiles/compare/2c3c3699-137e-49a3-a363-e0950bb278d4...41a33cf0-71ee-42aa-9791-9ef74f99e6c3/graph?settings%5Bdimension%5D=wt&settings%5Bdisplay%5D=landscape&settings%5BtabPane%5D=nodes&selected=&callname=main()&constraintDoc=
Screenshot 2023-02-16 at 16 52 52

TODO

  • Testing

Checklist

@miaulalala miaulalala self-assigned this Feb 7, 2023
@miaulalala miaulalala marked this pull request as draft February 7, 2023 14:57
lib/base.php Show resolved Hide resolved
apps/dav/lib/Connector/Sabre/Directory.php Show resolved Hide resolved
apps/dav/lib/Connector/Sabre/Directory.php Outdated Show resolved Hide resolved
lib/private/Server.php Outdated Show resolved Hide resolved
public function run($argument) {
$this->userManager->callForSeenUsers(function (IUser $user): void {
$this->logger->debug('Running chunk cleanup job for user '. $user->getUID());
$fileCache = new File();

Check notice

Code scanning / Psalm

DeprecatedClass

OC\Cache\File is marked deprecated
/**
* This job cleans up all backups except the latest 3 from the updaters backup directory
*/
public function run($argument): void {

Check notice

Code scanning / Psalm

MissingParamType

Parameter $argument has no provided type
@miaulalala miaulalala marked this pull request as ready for review February 7, 2023 19:35
@miaulalala miaulalala added pending documentation This pull request needs an associated documentation update 3. to review Waiting for reviews and removed 2. developing Work in progress labels Feb 9, 2023
@miaulalala miaulalala changed the title Do not set up filesystem on every call fix(performance): Do not set up filesystem on every call Feb 9, 2023
@juliushaertl juliushaertl force-pushed the enh/perf-remove-icache branch 2 times, most recently from 756cc5e to 270828b Compare February 10, 2023 10:54
@miaulalala
Copy link
Contributor Author

/rebase

@juliushaertl
Copy link
Member

Last commit seems to indeed break subfolder listing of mount points :/ Needs another dive into why Depth > 0 requests for dav fail with shares being moved into those subfolders without that then.

miaulalala and others added 5 commits February 17, 2023 19:18
Also remove old Oc_FileChunking logis that produced GC- collectable chunks

Signed-off-by: Anna Larch <anna@nextcloud.com>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliushaertl
Copy link
Member

I finally figured out why the failure was happening. When using the nodes api in dav we initialise it with the wrong view fake root /user/files instead of ``. This doesn't cause issues as dav rarely calls nodes api endpoints that then access the view. Pushed a fix in this PR to reuse already passed LazyFolder instances. The full fix is separate in #36774

@DaphneMuller
Copy link

hello @miaulalala
Thank you so much for your work on this pull request! This ticket seems to have the tag 'pending documentation'.
Is there any chance you could clarify what documentation is missing? Is this for admins or for app developers?

@miaulalala
Copy link
Contributor Author

This PR was reverted @DaphneMuller

@skjnldsv skjnldsv mentioned this pull request Feb 23, 2023
@ChristophWurst ChristophWurst removed the pending documentation This pull request needs an associated documentation update label Mar 16, 2023
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.

Basic auth requests always set up the filesystem
6 participants