Шукати в статтях підтримки

Остерігайтеся нападів зловмисників. Mozilla ніколи не просить вас зателефонувати, надіслати номер телефону у повідомленні або поділитися з кимось особистими даними. Будь ласка, повідомте про підозрілі дії за допомогою меню “Повідомити про зловживання”

Докладніше

Ця тема перенесена в архів. Якщо вам потрібна допомога, запитайте.

FileReader and FileReaderSync API's are slow

  • 1 відповідь
  • 1 має цю проблему
  • 1 перегляд
  • Остання відповідь від pkessing

more options

Hi I discovered this issue while using a customer facing HTML5 application. Our application requires that the browser reads a section of a file and then sends that section to a server via a websocket connection. Our application’s speed appeared to be browser dependent which led me and another team to write an application to test the speed of each browser. I have attached the data and graphs which clearly show that the Firefox Browser has a dramatically slower Synchronous and Asynchronous File Read functionality.

This data was collected by using the FileReader & and FileReaderSync API's. Our test app sliced a file into different chunks and read the entire file, one chunk at a time (using different chunksizes). I measured how long it would take to read a 25MB file and that time was used to calculate the file read rate in MBPS. When compared to Microsoft’s IE and Edge browsers, Firefox performed much worse when running the exact same code. It appeared to me while running my tests that Firefox throttles a particular thread that is taking too long to complete something. This conclusion was reached because the read rate starts at 1+ megabytes per second for the first few seconds and then quickly lowers into the hundreds or tens of kilobytes per second. This means that Firefox is not able to be used for running our application as we are trying to transfer files much bigger than 25MB which takes a very long time to complete!

Hi I discovered this issue while using a customer facing HTML5 application. Our application requires that the browser reads a section of a file and then sends that section to a server via a websocket connection. Our application’s speed appeared to be browser dependent which led me and another team to write an application to test the speed of each browser. I have attached the data and graphs which clearly show that the Firefox Browser has a dramatically slower Synchronous and Asynchronous File Read functionality. This data was collected by using the FileReader & and FileReaderSync API's. Our test app sliced a file into different chunks and read the entire file, one chunk at a time (using different chunksizes). I measured how long it would take to read a 25MB file and that time was used to calculate the file read rate in MBPS. When compared to Microsoft’s IE and Edge browsers, Firefox performed much worse when running the exact same code. It appeared to me while running my tests that Firefox throttles a particular thread that is taking too long to complete something. This conclusion was reached because the read rate starts at 1+ megabytes per second for the first few seconds and then quickly lowers into the hundreds or tens of kilobytes per second. This means that Firefox is not able to be used for running our application as we are trying to transfer files much bigger than 25MB which takes a very long time to complete!

Усі відповіді (1)

more options

Here is the graph of the data I collected.