Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293450

[PERFORMANCE] Simultaneous file uploads re-posting data

$
0
0

Problem/Motivation

In Drupal, all uploads posting via Ajax ($.ajaxSubmit). $.ajaxSubmit is posting FULL FORM DATA all time. Therefore when you uploading files simultaneously, the seconds and later uploads always re-upload previous file data.

In my testing, I trying to upload 2 files (20MB & 30MB). Here's the Content-Length for each posting:

FIRST INPUT:
Content-Length: 31647757

SECOND INPUT:
Content-Length: 53387537

Steps to reproduce:

1. Find a slow server / Or throttling via Proxy or Chrome Console / Or find a timer
2. Setup 2 file uploads
3. Starting to upload a large file to INPUT 1
4. During INPUT 1 is uploading, starting to upload another large file to INPUT 2
5. Check posting data length / upload time

(Noted that: You shouldn't trust Chrome Console throttling all time, in some cases won't work well.)

Proposed resolution

- Removing the UPLOADING INPUT temporarily
(I've attached a patch to demo how it's possible. However in my patch that doesn't handle any network failing.)

- (Or.. removing the form data before calling $.ajaxSubmit.)

Remaining tasks

- Needs a Patch

User interface changes

- TBA

API changes

- TBA

Data model changes

- TBA


Viewing all articles
Browse latest Browse all 293450

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>