[Webkit-unassigned] [Bug 266473] New: Performance severely degraded when drawing a canvas into another canvas while Advanced Tracking and Fingerprinting Protection is enabled

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 15 04:56:29 PST 2023


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

            Bug ID: 266473
           Summary: Performance severely degraded when drawing a canvas
                    into another canvas while Advanced Tracking and
                    Fingerprinting Protection is enabled
           Product: WebKit
           Version: Safari 17
          Hardware: All
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Canvas
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: paul.neave at gmail.com
                CC: dino at apple.com

Created attachment 469061

  --> https://bugs.webkit.org/attachment.cgi?id=469061&action=review

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20231215/597367ef/attachment.htm>


More information about the webkit-unassigned mailing list