A while back, when the EPiServer Community team was tweaking the performance of our Video Service, we found some weird facts about upload performance of different browsers. Especially about our beloved Firefox, which is my own personal favorite in the browser jungle.
The Video Service is delivered as a SaaS solution to our end-customers. The videos the users of the site upload is decoded, stored in and delivered from a custom built solution implemented in Amazon EC2 and Amazon S3. A great deal of the user experience is the time it takes for a user from picking the file to upload to seeing the video on the site. This includes some steps:
- Posting the file to Amazon
- Encoding the file to a Flash movie
- Notify the web site that video is ready for delivery
Since a significant part of this time is spent in step 1, the upload performance of the web browser is of great importance for the complete user experience. When testing the Video Service with different browsers we noticed that Firefox seemed to have a poor upload performance compared to other browsers. So, we decided to dig into this and do some more extensive testing.
The Tests
The tests were performed by creating a simple form (see below) that post to a page called uploadtest.php, which did nothing with the posted data. We timed the upload the old fashion way by using a stop watch. One may argue that this can not be that accurate, but considering we were using pretty large files and the tests were repeated several times we believe that any timing error caused by manual timing is negligible in comparison to the massive difference in upload time – especially since we were not after the absolute figures, rather we wanted to see the relationship in performance between different browsers and platforms.
<html>
<body>
<form method="post" enctype="multipart/form-data" action="uploadtest.php">
<input type="file" name="data">
<input type="submit">
</form>
</body>
</html>
Since we wanted to see if there were any difference depending on the file size, we performed the tests with two different files. In the first test case we used a file with size 9 307 242 bytes.
As you can see from the chart above Firefox is out-performed by all of the other players. Note that on Windows, Google Chrome and IE is four times as fast as Firefox. Safari is better than Firefox, but still a long way behind the leaders. We couldn’t believe our own eyes, so we turned to a test case with a larger file. This time the file size was 31 457 280 bytes.
The results on Windows are about the same as the previous test case, but Firefox on Ubuntu and Mac OS X seems to be on steroids. Safari has also significant better performance on Mac OS X with the bigger file.
Our main concern with these results were Firefox, since it is more common than Safari. With the performance, or really lack of performance, that Firefox showed in these test we thought that something most be wrong. After spending some time chatting with different people in the official Firefox irc channel (#firefox @ irc.mozilla.org) we decided to file a bug report at Mozilla, Bug 454990. Based on the comments for this bug report, it seems like other people have experienced similar problems.
Conclusion
I’m sad to say that the conclusion from these tests must be that if you are uploading a lot of files, especially if it is large files, you should leave Firefox behind and use Internet Explorer or Chrome instead – at least for now. I sincerely hope that Mozilla will fix these performance issues in the future, so I can go back to just use my favorite browser.
Note 1: Since we made the test new versions of the browsers have been launched.
Note 2: Of course we could have included more browsers in the test, but we concentrated on the most popular once.