Created attachment 469061 [details] Example HTML file When using context.drawImage() to draw a 2D canvas into another 2D canvas, performance is severely degraded when the Advanced Tracking and Fingerprinting Protection settings is enabled in Safari 17. Please try this following example is Safari 17 in a private tab (HTML file attached to this report). ` <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> ` Open the JavaScript console in Safari to see the timings for the operation. Then toggle the "Use advanced tracking and fingerprinting protection" setting, under Settings > Advanced > Privacy, and reload the page. On my Mac I see ~0.015 ms with Advanced Tracking and Fingerprinting Protection disabled. When it is enabled, I see the operation takes ~90 ms, a 6000x performance regression. Websites that use this technique are now unusable. This issue is affecting many users since Advanced Tracking and Fingerprinting Protection is now enabled by default for private tabs in Safari 17.
Please let us know if this still reproduces with Safari 17.2 (I cannot reproduce). *** This bug has been marked as a duplicate of bug 263129 ***
No, this is not fixed in iOS 17.2. Running the example shows: Normal tab: ~0.05 ms Private tab: ~60 ms
Hmm, I don't know what I did wrong, but now I'm reproducing this on macOS, even though I'm performing the same steps as the other day, and didn't change any preferences. Re-opening.
<rdar://problem/119821737>
Thanks for reporting this issue. I'm duping it to a slightly older bug for resolution. *** This bug has been marked as a duplicate of bug 266181 ***