Our HTML5 application allows users to choose multiple pictures from their library.
We have found that when the selection is performed on an iPhone or iPad the onchange event takes a very long time to trigger. This is slow for a small number of selected pictures but gets much worse when a larger number of pictures are selected (I think it actually fails when selecting a large number of pictures).
Steps to Reproduce:
1. Open the following URL in Safari on an iPhone or iPad
2. Select multiple pictures (minimum 10 - 20 or a large number such as 100).
The onchange event will eventually write a message to the page but this takes a long time and is dictated by the number of pictures chosen.
onchange to respond quickly.
onchange responds very slowly and can make our application look like it has crashed.
Note. I have also reported this in the Apple Bug Reporter - case 17917988.
I have investigated this some more and the performance issue appears to be with the file selection process rather than the onchange event. I have stripped my example down to the HTML below and have discovered the following:
1. Choosing 3 videos with the durations 0:32, 0:39, 0:02 was fastest.
2. Choosing 3 screen shots was slower.
3. Choosing 3 pictures taken with a camera (iPhone 5 / iOS7) was slowest.
To me, this looks like the problem is related to either the size of the file or the content of the file.
Our app is a HTML5 based photo app which allows users to select lots of pictures. Unfortunately, due to this performance issue our users are complaining that it is unusable once they choose a few pictures as nothing happens for quite some time. We think iOS 8.0.2 might be faster than iOS7 but it is difficult to confirm this. However, even with iOS 8.0.2 the performance is still unusably slow.
<input id="uploads" name='uploads' type="file" multiple>