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

perf: Avoid updating the folder size if we know the size difference #42597

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

juliushaertl
Copy link
Member

@juliushaertl juliushaertl commented Jan 5, 2024

When using object storage the scanner does not return any results so correctFolderSize was always called even for operations where we don't need to update the parent sizes like mkdir.

This PR introduces a shortcut to skip this update if we know the size difference for sure so it can be propagated through

$this->propagator->propagateChange($path, $time, $sizeDifference);

@juliushaertl juliushaertl added this to the Nextcloud 29 milestone Jan 5, 2024
@juliushaertl juliushaertl force-pushed the perf/s3-mkdir-update-size branch 2 times, most recently from 5da1ccc to 2257462 Compare January 5, 2024 20:48
@juliushaertl juliushaertl requested review from icewind1991, Altahrim, a team and ArtificialOwl and removed request for a team January 5, 2024 21:01
@juliushaertl juliushaertl added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jan 5, 2024
@juliushaertl juliushaertl marked this pull request as ready for review January 5, 2024 21:01
@juliushaertl
Copy link
Member Author

Tests passing except for unrelated failure that also happens on master

@juliushaertl
Copy link
Member Author

Failures seem consistent with this change though I have no idea why those would occur. Will look into

Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliushaertl juliushaertl merged commit 8c77714 into master Jan 23, 2024
50 checks passed
@juliushaertl juliushaertl deleted the perf/s3-mkdir-update-size branch January 23, 2024 18:39
@blizzz blizzz mentioned this pull request Mar 5, 2024
@icewind1991
Copy link
Member

/backport to stable28

@icewind1991
Copy link
Member

/backport to stable27

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.

4 participants