WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
172627
multiple files(5 files) upload with XMLHttpRequest(high cpu usage when listen to onprogress)
https://bugs.webkit.org/show_bug.cgi?id=172627
Summary
multiple files(5 files) upload with XMLHttpRequest(high cpu usage when listen...
baobao
Reported
2017-05-25 19:48:27 PDT
Here are the code sample: var _createXDomainRequest = function(){ var xhr = new XMLHttpRequest(); //xhr.withCredentials = true; if(isIE9 && XDomainRequest){ xhr = new XDomainRequest(); } return xhr; }; var blobSlice = window.File && (File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice) || function(){}; var ajax = _createXDomainRequest(); ajax.onload = function(){}; ajax.onerror = function(){}; if(ajax.upload){ ajax.upload.onprogress = function (event){} } ajax.open('put', this.rangeData.upload_url, true); ajax.setRequestHeader("Etag", md5); ajax.setRequestHeader("Authorization", self.token); ajax.send(blobSlice.call(self.blobFile, start, (end + 1))); if i comment /* if(ajax.upload){ ajax.upload.onprogress = function (event){} } */ all the file upload are fine. but I try to listen to onprogress, which cause high CPU usage.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2017-05-25 19:48:48 PDT
<
rdar://problem/32418707
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug