-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Chunked Files: Optimize checking if all chunks are there #22601
Comments
Client issue showing that the more chunk, the slower: owncloud/client#4354 |
Fixes #22601 Before we did a full test on all chunks to verify if a chunked upload was completed. This is unneeded since if we are missing one chunk we can already fail. Also we look from back to front since it is much more likely that we find a missing chunk thus can error out early.
Sounds like a plan. |
PR already in #22602 |
After thinking about it we now just traverse the list from back to front (instead of front to back) and error out the moment we find 1 missing chunk.. But the idea is the same :) |
@PVince81 @cmonteroluque just FYI this helps with a blue ticket on the client.. so would 9.0.1 be an option? (PR is already available). |
Fixes #22601 Before we did a full test on all chunks to verify if a chunked upload was completed. This is unneeded since if we are missing one chunk we can already fail. Also we look from back to front since it is much more likely that we find a missing chunk thus can error out early.
done |
Fixes #22601 Before we did a full test on all chunks to verify if a chunked upload was completed. This is unneeded since if we are missing one chunk we can already fail. Also we look from back to front since it is much more likely that we find a missing chunk thus can error out early.
Fixes #22601 Before we did a full test on all chunks to verify if a chunked upload was completed. This is unneeded since if we are missing one chunk we can already fail. Also we look from back to front since it is much more likely that we find a missing chunk thus can error out early.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
(not proven 100%)
We've seen benchmarks (TODO: where) where we have seen that for chunked files the later chunks take longer and longer than the first chunks. We're thinking
isComplete
ofOC_FileChunking
is to be blamed because it checks the file system for the existance of all chunks for the file. This gets slower (? probably because a succesful stat takes more time)core/lib/private/filechunking.php
Line 76 in c5a200c
One optimization idea: Have a fast path to check for
currentChunk+1
(if it has that many chunks) and if that does not exist then return immediatly asfalse
instead of counting all chunks.FYI @dragotin @DeepDiver1975 @jturcotte @ogoffart @rullzer
The text was updated successfully, but these errors were encountered: