|Summary:||XMLHttpRequest Progress Even Not Firing for Requests Finished under 100Ms|
|Component:||WebKit Misc.||Assignee:||Nobody <webkit-unassigned>|
|Severity:||Normal||CC:||ap, cdumez, gsnedders, webkit-bug-importer, youennf|
|Version:||Safari Technology Preview|
Description OpenSpeedTest.com 2021-09-14 20:19:53 PDT
To reproduce this issue use https://hub.docker.com/u/openspeedtest on a 10Gbps network (Wired)(I used 10GbE M1 Mac Mini) or https://apps.apple.com/in/app/openspeedtest-server/id1579499874?mt=12 on a Mac With high speed connectivity #1 Issue found when tested 10 Gbps Network on my M1 MacMini with 10GbE XHR progress event not firing when a request that is completed under 100 Ms. So programs depends on Progress even will not work correctly. Up to 2.5 Gbps this issue is not found in Wired Network on MacOS. #2 Issue found on iPhone XR when test LAN speed on WiFi. Upload Progress even was not firing on a connection speed that was 400Mbps. Why XHR progress event is not firing on VERY FAST connection or a request that is finished under 100 Ms? This is expected Behavior?
Comment 1 Sam Sneddon [:gsnedders] 2021-09-15 04:05:37 PDT
Are we talking about progress events for the request upload or the response download? How often, and when, do you expect the progress event to fire? The spec says: > If not roughly 50ms have passed since these steps were last invoked, then return. So on the face of it, it should fire roughly every 50ms. That said, going back to your root issue, I think the problem here is WebKit doesn't fire it _at all_ if it the request happens too quickly? That does sound like a bug.
Comment 3 OpenSpeedTest.com 2021-09-15 04:56:26 PDT
I found this issue Two Months Ago and handled this issue via XHR OnLoad event which is just a workaround. but it was working fine. And this is happening only on speed which is 2.5Gbps or higher. So most people will not run in to this issue right now. But Clearly this is going to break some functions that is dependent on XHR progress event. Someone from twitter contacted me and reported he found same Behavior on his iPhone XR. But For me unable to reproduce this on my iPhone 6S. I thought XR was more powerful and capable for doing that just like a mac. But turns out it was a problem with his server configuration. But this problem still exists on a Mac with Safari and i can reproduce this if i execute UPLOAD request on local host or on a very high speed connection that is 2.5Gbps or Higher. So this problem i found is for UPLOAD PROGRESS. You said it is firing every 50ms which is good. but in my case i added a delay of 100Ms delay for new requests and it worked without issue. So i think if there is pending request (For a speed test there will be always few pending requests will be there) it will not fire upload progress event and quickly go to OnLoad event. So currently my program logic will check for upload progress event and if it was not fired. It will add the payload data size manually in the OnLoad event. I think even if a request that started and finished under 10Ms should get at-least one progress event. So programs that depends on Progress even will not break. For 2.5Gbps, 5Gbps and 10Gbps connection Chrome is working without any issue.
Comment 4 Alexey Proskuryakov 2021-09-17 16:37:45 PDT
Comment 5 OpenSpeedTest.com 2021-09-18 08:28:14 PDT
Depend on progress event alone is a bad idea right? It may or may not fire. Especially for request load under 100 or 50Ms. Can you give more scenarios where progress event will not fire?
Comment 6 Sam Sneddon [:gsnedders] 2021-09-18 09:13:18 PDT
Comment 7 OpenSpeedTest.com 2021-09-19 21:40:00 PDT
Then this is a bug? "Definitely per spec it should always fire at least once." Clearly this is not happening on Latest Safari for requests that is finished under 100 or 50 Ms.