Skip to content

BugFix - Track File Upload Index #14822

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

alperozturk96
Copy link
Collaborator

@alperozturk96 alperozturk96 commented Apr 25, 2025

  • Tests written, or not not needed

Problem

Currently, the logic implemented in FileUploadWorker processes file uploads in discrete batches, which limits our ability to track the overall upload progress accurately and total upload index is wrong. We have outer while loop to update uploads and inner for loop for uploads.

For example, when a user attempts to upload 164 files:

  1. The first batch is processed, triggering a progress notification for files 1–2.
  2. The second batch then triggers a notification for files 23–2.
  3. The third batch triggers a notification for files 53–2
  4. ... and final batch 164-2.

How to reproduce?

  1. Create a folder
  2. Try to upload n times file
  3. Observe file upload notification

Solution

  • Pass totalUploadSize to the worker and utilize it internally.
  • Update FileUploadWorker to support parallel job execution instead of queuing. This allows users to initiate multiple folder uploads independently, enabling better performance and more accurate tracking in notifications.

Demo

ddd.mp4

ZetaTom

This comment was marked as resolved.

@alperozturk96 alperozturk96 force-pushed the bugfix/track-file-upload-index branch 2 times, most recently from 9bab4d3 to 162560c Compare April 30, 2025 11:59
@alperozturk96 alperozturk96 requested a review from ZetaTom April 30, 2025 15:51
@alperozturk96 alperozturk96 added the performance 🚀 Performance improvement opportunities (non-crash related) label May 2, 2025
alperozturk96 and others added 9 commits May 26, 2025 12:14
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
@alperozturk96 alperozturk96 force-pushed the bugfix/track-file-upload-index branch from 10d07bf to 2b18be9 Compare May 26, 2025 04:14
Copy link

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/14822.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

Copy link

Codacy

Lint

TypemasterPR
Warnings5151
Errors1111

SpotBugs

CategoryBaseNew
Bad practice6565
Correctness5859
Dodgy code292279
Experimental11
Internationalization77
Malicious code vulnerability11
Multithreaded correctness77
Performance5148
Security1818
Total500485

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review performance 🚀 Performance improvement opportunities (non-crash related)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants