Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google chrome Upload Speed vs Firefox

Application is uploading a large file. Google Chrome is reaching maximum of 800 to 900Mbps on LocalHost. But Firefox can reach up to 2Gbps or more! Why this much difference? Changing responseType to blob helped in GET request. How to make upload (POST request) faster on Google Chrome.

 function sendRequest(n){
    var Self = this;
        Self.newTime = Date.now();
        Self.Open = new XMLHttpRequest();

      Self.Open.upload.onprogress = function(event){
        console.log("Upload Pregress")

        Self.CurTime = (Date.now() - Self.newTime);
        Self.OverallCurTime = (Date.now() - Self.OverallTime) / 1000;
        Self.EventData = event.loaded;
        Self.EventTotal = event.total;
        Self.SpeedData = (parseFloat((8000 * (Self.EventData /Self.CurTime[n]) / 1048576)));
        }

       Self.Open.open("POST", "upload.bin" + "?n=" +  Math.random(), true);
       Self.Open.setRequestHeader("Content-Type", "arrayBuffer");
       Self.Open.responseType = "blob";
       Self.Open.send(Self.UploadData);

    }
like image 584
Vishnu Avatar asked Jul 09 '16 10:07

Vishnu


People also ask

Does Firefox load faster than Chrome?

Is Firefox Faster Than Chrome? No, Chrome is significantly faster and more memory-efficient than Firefox.

Is Firefox slower than Chrome?

Mozilla claims that Firefox loads websites slightly faster than Chrome. Firefox does seem snappier sometimes, but not always. Here's the same site loaded on Firefox: The page loads slightly faster than on Chrome — the image shows almost instantaneously, while Chrome takes a few extra milliseconds.

Which is better Foxfire or Google Chrome?

Firefox is a free and open-source web browser that provides a number of features for easy web browsing. Google Chrome is a free web browser but it is not open source, it is the most used web browser for desktop.

Is Chromium faster than Firefox?

In fact, Chrome is now the fastest browser around, with Microsoft's Edge browser (built on a similar “Chromium” framework) not far behind. Firefox isn't as fast and does tend to take up a little too much RAM when you're using it for multiple tasks, but it's no slouch – still running faster than stock Chromium.

Does Firefox load websites faster than chrome?

Another tasty claim is that Firefox loads websites faster than Chrome. I tried Firefox to see how well it stacks up against Chrome: Above, Firefox is on the left, and Google Chrome is on the right. Design-wise, both web browsers are pretty similar.

How does Firefox compare to Google Chrome?

I tried Firefox to see how well it stacks up against Chrome: Above, Firefox is on the left, and Google Chrome is on the right. Design-wise, both web browsers are pretty similar. Firefox, however, has the edge for ease of use.

How do we test the speed of Firefox and chrome?

We ran Firefox and Chrome through three benchmark speed tests to assess their capability for handling certain types of tasks. The three tests are Speedometer, JetStream 2 and MotionMark. The most important test, Speedometer, measures how fast the browser can process tasks written in JavaScript.

Is Firefox the fastest browser?

However, Firefox is not efficient with its memory usage and consumes a lot of RAM at once. We put several browsers through multiple speed tests and Chrome was almost always the fastest browser (at least without extensions). Even at high loads, pages loaded quickly with Chrome and we experienced no latency.


1 Answers

If we could exclude the difference from the JS engine speed" Chrome VS Firefox, then in theory your test case should not happen.

I would advise you to take a look at the following open bugs from chrome regarding the blob

https://bugs.chromium.org/p/chromium/issues/list?can=2&q=blob&colspec=ID+Pri+M+Stars+ReleaseBlock+Component+Status+Owner+Summary+OS+Modified&x=m&y=releaseblock&cells=ids

But just to make focus on the possibility of the bug being the answer for your question, I can also show you other bugs using Blob in Firefox:

"XMLHttpRequest of large data (approx 140MB) with response type "blob" returns a corrupt file (about 600,000 bytes around 9M in the blob appear incorrect)."

https://bugzilla.mozilla.org/show_bug.cgi?id=1349862

Also, if I make a count on bugs related to the word "blob", then Firefox only has 177 bugs found VS 751 in Chrome.

https://bugzilla.mozilla.org/buglist.cgi?quicksearch=Blob

like image 84
Dryadwoods Avatar answered Sep 20 '22 20:09

Dryadwoods