Created attachment 468172 [details] a video recorded on iPhone11 that reproduces the issue Hello, I've found an issue where the cavas.drawImage() API is up to 100 times slower on private mode than on "normal" mode. I've been able to test the issue on: - iOS 17.0.3 - iPhone 11 - iOS 17.0.2 - iPhone SE 2nd gen - Safari 17.0 (18616.1.27.111.22, 18616) - MacBook Pro 14-inch, 2021 M1 - MacOS 13.6 (22G120) And I've registered a slow down in all these devices. I've put together a demo code pen that reproduces the issue: https://codepen.io/esnhoesnho/pen/NWeJdRV?editors=1010 To reproduce the bug just open the link above in private mode. The UI will print the measured milliseconds on top of the page. I attach a video recorded on iPhone11. Thanks, Luca
<rdar://problem/117132326>
This bug occurs when Advanced Tracking and Fingerprinting Protection is enabled. This is on by default for private tabs in Safari 17. I've filed an example in bug #266473. Try the following example code with "Use advanced tracking and fingerprinting protection" setting enabled under Settings > Advanced > Privacy. Website are unusable in this state. ` <html> <body> <canvas id="canvas"></canvas> <script> const width = 800; const height = 800; const canvas = document.getElementById('canvas'); canvas.width = width; canvas.height = height; const context = canvas.getContext('2d'); const imageCanvas = document.createElement('canvas'); imageCanvas.width = width; imageCanvas.height = height; const imageContext = imageCanvas.getContext('2d'); imageContext.fillStyle = 'red'; imageContext.fillRect(0, 0, width, height); console.time('drawImage'); context.drawImage(imageCanvas, 0, 0); console.timeEnd('drawImage'); </script> </body> </html> `
I confirm, this bug and #266473 looks the same. I've got the feeling the the overall stability is reduced while working with canvases on 17.x . But this is hard to reduce to a simple example. I hope that at least this issue will be mitigated in future releases.
Thanks for reporting this, a fix for this is being work on in bug 266181. *** This bug has been marked as a duplicate of bug 266181 ***