WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
252876
Slow performance of GPUP WebGL for rendering-heavy applications (like machine learning inference)
https://bugs.webkit.org/show_bug.cgi?id=252876
Summary
Slow performance of GPUP WebGL for rendering-heavy applications (like machine...
tmullen.webkit
Reported
2023-02-23 17:31:13 PST
Observed so far on iPhone 12, 13 and 14, with iOS 16.2 and iOS 16.3. Repro steps: - Go to
https://codepen.io/catchinglight/pen/JjaKvNQ
- Acknowledge warning and allow access to camera - Point phone camera so as to keep exactly one hand visible in the selfie camera's field of view - Observe FPS number - Close this Safari tab - Disable Settings app --> Safari --> Advanced --> Experimental Features --> Gpu Process: WebGL - Open a new Safari tab - Go back to
https://codepen.io/catchinglight/pen/JjaKvNQ
and observe much higher FPS number when repeating the same steps as before The problem is not unique to the above CodePen, but the heavy use of WebGL there (for machine learning inference) coupled with an FPS display, makes it a nicer repro case than many other sites. This bug seems possibly related:
https://bugs.webkit.org/show_bug.cgi?id=250899
, since the ML applications where this has been observed do use a readPixels call to grab GPU data back to CPU every frame for post-processing. However, I'm not sure how to verify definitively one way or the other.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-03-02 17:32:15 PST
<
rdar://problem/106173126
>
tmullen.webkit
Comment 2
2023-03-27 17:12:23 PDT
Tested on the public iOS Beta 16.4, and the issue does not appear to be fixed there. Furthermore, it seems that the experimental toggle to disable the WebGL GPUP feature may be no longer available as well, which would prevent even user action from working around the problem.
Kimmo Kinnunen
Comment 3
2023-05-22 05:38:35 PDT
Thank you for the report. Yes, readPixels is slower on GPU process. I'll see about some approaches improve it.
Kimmo Kinnunen
Comment 4
2023-06-28 22:57:57 PDT
The read pixels performance is improved in the depending bugs. These should be available in iOS 17 betas, macOS 14 betas. Based on quick testing, the test case FPS number seem to improve ~50%, IIRC.
Bug 235002
tracks the slowness of the read pixels of the ANGLE/Metal backend. This is directly related to this task, but likely not addressed in near future.
Bug 257958
tracks the slowness of texture uploads, which might be relevant for some apps that touch the rendering with CPU. However, this is not directly relevant to this task. Closing this bug to make progress. Please re-open or open new bug report if there's new observations on the lack of performance.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug