<?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>180593</bug_id>
          
          <creation_ts>2017-12-08 11:37:52 -0800</creation_ts>
          <short_desc>Web Inspector: Canvas recordings use a lot of memory and are never released</short_desc>
          <delta_ts>2017-12-08 16:02:56 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <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>
          
          <blocked>173807</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Blaze Burg">bburg</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bburg</cc>
    
    <cc>hi</cc>
    
    <cc>inspector-bugzilla-changes</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1379678</commentid>
    <comment_count>0</comment_count>
    <who name="Blaze Burg">bburg</who>
    <bug_when>2017-12-08 11:37:52 -0800</bug_when>
    <thetext>via Nelson Thachuk:

* SUMMARY
- Canvas Tab: high resource usage when recording/after completing recording

* STEPS TO REPRODUCE
1. Launch Safari
2. Navigate to https://www.google.com/maps/place/Apple+Infinite+Loop/@37.3316756,-122.0323777,17z/data=!3m1!4b1!4m5!3m4!1s0x808fb5b6c4951d0f:0xb651414deb31e9fb!8m2!3d37.3316756!4d-122.030189
3. Show Web Inspector (⌥⌘I)
4. Click New Tab button
5. Select Canvas tab
6. Launch Activity Monitor
7. Filter by “Safari”
8. Return to Safari and record the Canvas
9. Interact with Google Maps (NOTE: the Web Content processes’ CPU usage spikes)
10. Wait for recording to finish (NOTE: the Web Content processes’ CPU usage returns to normal and Web Inspector’s processes’ Memory usage spikes)
11. Dismiss the recording or close the Canvas tab and wait 30 seconds

* EXPECTED RESULTS
- Memory should be released

* ACTUAL RESULTS
- Memory is not released until the Web Inspector process is killed</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1379683</commentid>
    <comment_count>1</comment_count>
    <who name="Blaze Burg">bburg</who>
    <bug_when>2017-12-08 11:39:14 -0800</bug_when>
    <thetext>&lt;rdar://problem/35893620&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1379690</commentid>
    <comment_count>2</comment_count>
    <who name="Blaze Burg">bburg</who>
    <bug_when>2017-12-08 11:41:34 -0800</bug_when>
    <thetext>The resource usage is somewhat expected, though we should have some way to clear recordings from memory if we don&apos;t expect to ever see them again. I don&apos;t know in what cases this would make sense.

After navigating, clear if:
- User never opened the recording
- Canvas Tab is closed
- Web Inspector is closed

Preserve recording if:
- User has opened it at least once
- It is imported from file
- Relevant canvas has been deleted from DOM but page hasn&apos;t navigated</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>