<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>230751</bug_id>
          
          <creation_ts>2021-09-24 08:19:43 -0700</creation_ts>
          <short_desc>REGRESSION (Safari 15): Protomaps is very slow/hangy in Safari (large paths?)</short_desc>
          <delta_ts>2021-10-28 21:22:08 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Canvas</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>231157</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bdon</cc>
    
    <cc>dino</cc>
    
    <cc>heycam</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1796887</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2021-09-24 08:19:43 -0700</bug_when>
    <thetext>https://protomaps.github.io/protomaps.js/examples/leaflet.html#11/35.6079/139.7458 is very slow, to the point of hanging.

Seems like a canvas/GPU process thing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1796888</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-09-24 08:20:28 -0700</bug_when>
    <thetext>&lt;rdar://problem/83497019&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1797734</commentid>
    <comment_count>2</comment_count>
    <who name="Brandon Liu">bdon</who>
    <bug_when>2021-09-27 18:46:31 -0700</bug_when>
    <thetext>Hi, library author here. To describe what I&apos;m seeing: On Safari 15 on macOS Big Sur, Technology Preview, and iOS 15 Safari, the tab will either crash or the UI thread will hang randomly after panning/zooming for a while, sometimes immediately on page load.

I can confirm that turning off “GPU Process: Canvas Rendering” fixes the problem, but that isn&apos;t a viable workaround for users.

From experimenting with the Canvas calls in the library it seems to be related to rasterizing a path (context.fill(), context.stroke()) with hundreds to thousands of vertices.

Similar bug reports:

1. https://developer.apple.com/forums/thread/685866
2. https://github.com/ant-design/ant-design-charts/issues/855
3. https://github.com/flutter/flutter/issues/89655</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1797740</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2021-09-27 19:01:20 -0700</bug_when>
    <thetext>Thanks for the update, we&apos;re tracking this regression.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1803669</commentid>
    <comment_count>4</comment_count>
    <who name="Brandon Liu">bdon</who>
    <bug_when>2021-10-13 01:01:24 -0700</bug_when>
    <thetext>As an update, I&apos;m pretty sure the root cause here is the same at https://bugs.webkit.org/show_bug.cgi?id=231157 .

I&apos;ve implemented a workaround for the library to limit the # of vertices in a single call to stroke() or fill(). It&apos;s been successful so far on the devices I&apos;ve tested, will report back after more testing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1809921</commentid>
    <comment_count>5</comment_count>
    <who name="Cameron McCormack (:heycam)">heycam</who>
    <bug_when>2021-10-28 17:33:52 -0700</bug_when>
    <thetext>Brandon, is the workaround already present in the URL Simon linked in comment 0?  Testing with that URL I couldn&apos;t reproduce the hanging.

If so, then we should probably just dupe this bug to the long path issue in bug 231157.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1809934</commentid>
    <comment_count>6</comment_count>
    <who name="Brandon Liu">bdon</who>
    <bug_when>2021-10-28 18:58:46 -0700</bug_when>
    <thetext>Cameron,

There is a partial workaround implemented on that page which makes it more difficult to reproduce, but the crash/hang is still present; I do believe the root cause is the same, so you can mark this as a dupe.

Brandon</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1809955</commentid>
    <comment_count>7</comment_count>
    <who name="Cameron McCormack (:heycam)">heycam</who>
    <bug_when>2021-10-28 21:22:08 -0700</bug_when>
    <thetext>Thanks for confirming.

*** This bug has been marked as a duplicate of bug 231157 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>