FileReader and FileReaderSync API's are slow
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!
Všetky odpovede (1)
Here is the graph of the data I collected.