<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>254616</bug_id>
          
          <creation_ts>2023-03-28 13:50:03 -0700</creation_ts>
          <short_desc>REGRESSION (iOS 16.4): Adding images for upload is 2.8x slower than before</short_desc>
          <delta_ts>2024-01-17 11:29:09 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Misc.</component>
          <version>Safari 16</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 16</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=251328</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jesper Bendtsen">jesperbendtsen83</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>akeerthi</cc>
    
    <cc>georaldc</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1944730</commentid>
    <comment_count>0</comment_count>
    <who name="Jesper Bendtsen">jesperbendtsen83</who>
    <bug_when>2023-03-28 13:50:03 -0700</bug_when>
    <thetext>Add images for upload in iOS 16.4 is extremely slow, see below videos, same code and wifi. 

It could also be nice with an loader indicator after pressing add, people will think they haven&apos;t pressed the button...

Add 60 images for upload (iOS 16.4) - 2.01 minutes!
https://vimeo.com/812571819/ed0ebb7d34

Add 60 images for upload (iOS 15.7) - 44 seconds!
https://vimeo.com/812571862/c0acf78912</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1944921</commentid>
    <comment_count>1</comment_count>
    <who name="Jesper Bendtsen">jesperbendtsen83</who>
    <bug_when>2023-03-29 02:33:39 -0700</bug_when>
    <thetext>works fine in iOS 16.3.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1944981</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-03-29 08:26:23 -0700</bug_when>
    <thetext>&lt;rdar://problem/107368578&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1944983</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2023-03-29 08:29:14 -0700</bug_when>
    <thetext>Thank you for the report! 

Could you please provide a test case? This may depend on the exact accept attribute value, as one theory that comes to mind is format conversion taking the time.

Also, what are the camera settings in both cases, are the photos JPEG or HEIC?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1945005</commentid>
    <comment_count>4</comment_count>
    <who name="Jesper Bendtsen">jesperbendtsen83</who>
    <bug_when>2023-03-29 09:13:46 -0700</bug_when>
    <thetext>I can give you access to the test system, actually you already have access with  safaribrowsertest@hotmail.com from another bug report? I can guide you guys to the upload area, if its okay?

File input accept attribute: image/* (But is not working, another bug 254604)

Both iPad&apos;s: Most compatible and JPEG</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1945024</commentid>
    <comment_count>5</comment_count>
    <who name="Aditya Keerthi">akeerthi</who>
    <bug_when>2023-03-29 09:56:34 -0700</bug_when>
    <thetext>Hello again! Yeah, we should have access to the test system from https://bugs.webkit.org/show_bug.cgi?id=249967.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1945149</commentid>
    <comment_count>6</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-03-29 15:47:42 -0700</bug_when>
    <thetext>Relevant? https://bugs.webkit.org/show_bug.cgi?id=251328</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1951253</commentid>
    <comment_count>7</comment_count>
    <who name="Jesper Bendtsen">jesperbendtsen83</who>
    <bug_when>2023-04-25 22:03:44 -0700</bug_when>
    <thetext>Any update on this? Please help my users are complaining...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1956927</commentid>
    <comment_count>8</comment_count>
    <who name="Jesper Bendtsen">jesperbendtsen83</who>
    <bug_when>2023-05-22 05:45:16 -0700</bug_when>
    <thetext>The same thing happens in iOS 16.5

In iOS 16.3.1 adding 60 images in a file input takes about one second, in iOS 16.4 and above the same thing takes over a minute!?

Public test site, scroll to &quot;Using file inputs&quot;, add about 60 images:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#using_file_inputs</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1957434</commentid>
    <comment_count>9</comment_count>
    <who name="">georaldc</who>
    <bug_when>2023-05-23 14:08:03 -0700</bug_when>
    <thetext>(In reply to Jesper Bendtsen from comment #8)
&gt; The same thing happens in iOS 16.5
&gt; 
&gt; In iOS 16.3.1 adding 60 images in a file input takes about one second, in
&gt; iOS 16.4 and above the same thing takes over a minute!?
&gt; 
&gt; Public test site, scroll to &quot;Using file inputs&quot;, add about 60 images:
&gt; https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/
&gt; file#using_file_inputs

Been noticing this same behavior as well where there is a delay after selecting multiple images that seems to grow the more images you select. 

Just curious, but have you also been experiencing this issue I brought up here?

https://bugs.webkit.org/show_bug.cgi?id=256711

Ever since 16.4.1, our users have been randomly encountering this issue now. Just happened to see your bug post as I was searching for other closely related issues (that dealt with browser uploads on IOS 16.4 and newer)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1957665</commentid>
    <comment_count>10</comment_count>
    <who name="Aditya Keerthi">akeerthi</who>
    <bug_when>2023-05-24 11:21:06 -0700</bug_when>
    <thetext>(In reply to Jesper Bendtsen from comment #7)
&gt; Any update on this? Please help my users are complaining...

Apologies for the late response. This is something we are looking into.

The issue is fallout from our adoption of a new system photo picker in iOS 16.4. However, we have identified ways that we can improve the performance in WebKit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1978374</commentid>
    <comment_count>11</comment_count>
    <who name="Jesper Bendtsen">jesperbendtsen83</who>
    <bug_when>2023-09-19 11:57:27 -0700</bug_when>
    <thetext>Still extremely slow in iOS 17, any update?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1978709</commentid>
    <comment_count>12</comment_count>
    <who name="Aditya Keerthi">akeerthi</who>
    <bug_when>2023-09-20 10:22:17 -0700</bug_when>
    <thetext>After additional investigation, it appears that this issue is underneath WebKit. I don&apos;t have any other updates at this time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1979900</commentid>
    <comment_count>13</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2023-09-25 12:07:12 -0700</bug_when>
    <thetext>Let&apos;s mark this as RESOLVED/MOVED for clarity. Please file any additional reports via https://feedbackassistant.apple.com for Apple engineers looking into this to have the most visibility into your feedback.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2005632</commentid>
    <comment_count>14</comment_count>
    <who name="Jesper Bendtsen">jesperbendtsen83</who>
    <bug_when>2024-01-17 11:29:09 -0800</bug_when>
    <thetext>Are there any plans to make this better? We have a web app where our users often take 60-70 photos for upload. It takes approx. one minute before they return to the web app after selecting images from the iOS image gallery and uploading can begin. Users think iOS has crashed, no loader is shown. Can&apos;t you go back to the old photo API before iOS 16.4, back then it was fast, there was no delay after selecting 60-70 and the upload started immediately in iOS Safari.

Why is it so super slow now in iOS Safari, please explain? Doesn&apos;t feel production ready...</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>