<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Inspector: High Level Memory Overview Instrument"
   href="https://bugs.webkit.org/show_bug.cgi?id=153516#c14">Comment # 14</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Inspector: High Level Memory Overview Instrument"
   href="https://bugs.webkit.org/show_bug.cgi?id=153516">bug 153516</a>
              from <span class="vcard"><a class="email" href="mailto:joepeck&#64;webkit.org" title="Joseph Pecoraro &lt;joepeck&#64;webkit.org&gt;"> <span class="fn">Joseph Pecoraro</span></a>
</span></b>
        <pre><span class="quote">&gt; &gt; Source/WebInspectorUI/UserInterface/Views/MemoryCategoryView.js:84
&gt; &gt; +        if (!maxSize)
&gt; 
&gt; Still not convinced it's going to be much faster to pass in min/max instead of recomputing them. I guess the number of arguments to this function seems a lot to me and easy to mess up.</span >

The reason I passed this in instead of recomputing, is so that this code can update its labels with min/max and immediately handle the special case of max === 0 without having to loop through everything to figure that out.

This is a place that will likely only ever have a single call site, so I'm not worried about parameters.


<span class="quote">&gt; Mostly down to small details now. Please post a new patch (hopefully EWS
&gt; will like it this time).
&gt; 
&gt; &gt; Source/WebInspectorUI/UserInterface/Views/MemoryCategoryView.js:101
&gt; &gt; +        let lastX = Math.floor(xScale(lastTime));
&gt; 
&gt; Is there any reason to floor the value here? Won't it just get clipped by
&gt; the view box?</span >

If lastTime is the current time marker, I want to make sure this doesn't leak past it.


<span class="quote">&gt; &gt; Source/WebInspectorUI/UserInterface/Views/MemoryCategoryView.js:112
&gt; &gt; +        const emDash = &quot;\u2014&quot;;
&gt; 
&gt; I wish we had a lookup table for these somewhere, as I mess them up all the
&gt; time.</span >

I've been waiting for this patch to land before just making emDash a global in Utilities that we can use anywhere.


<span class="quote">&gt; &gt; Source/WebInspectorUI/UserInterface/Views/MemoryTimelineOverviewGraph.js:63
&gt; &gt; +        this._updateLegend();
&gt; 
&gt; This call seems redundant.
&gt; 
&gt; &gt; Source/WebInspectorUI/UserInterface/Views/MemoryTimelineOverviewGraph.js:64
&gt; &gt; +        this._chart.clear();
&gt; 
&gt; This one too.</span >

These are both required, unless something is guaranteeing a layout.

<span class="quote">&gt; &gt; Source/WebInspectorUI/UserInterface/Views/MemoryTimelineView.js:62
&gt; &gt; +        chart2SubtitleElement.textContent = WebInspector.UIString(&quot;High Water Mark&quot;);
&gt; 
&gt; I'm imagining how this will get localized, and dying a little bit. Does
&gt; anyone else have some alternatives?</span >

As you can tell from the original code, I had named this &quot;Max Comparison&quot;.


<span class="quote">&gt; &gt; Source/WebInspectorUI/UserInterface/Views/MemoryTimelineView.js:140
&gt; &gt; +        this._usageCircleChart.clear();
&gt; 
&gt; It is interesting to me that clear() does not already imply needsLayout().</span >

It did previously, but I pulled it out. I did this to reduce the number of unnecessary requestAnimationFrame + immediately cancelAnimationFrame calls that were happening every animation frame (layout).

<span class="quote">&gt; &gt; Source/WebInspectorUI/UserInterface/Views/MemoryTimelineView.js:231
&gt; &gt; +            categoryView.layoutWithDataPoints(dataPoints, visibleEndTime, min, max, xScale, yScale);
&gt; 
&gt; As I said above, it should be possible to overdraw the first and last data
&gt; points and have the bounding box get clipped automatically. So,
&gt; visibleEndTime might not be necessary to compute.</span >

`visibleEndTime` can be the current time marker in the middle of our graph. We don't want to draw past the current time marker.

<span class="quote">&gt; &gt; Source/WebInspectorUI/UserInterface/Views/MemoryTimelineView.js:297
&gt; &gt; +        totalElement.textContent = (percent === 100 ? percent : (percent - 0.05).toFixed(1)) + &quot;%&quot;;
&gt; 
&gt; Why does this lop off .05%? Maybe add a comment.</span >

I did not want to have the text round 99.95-99.99 up to 100 and yet still have the graph showing a non-100% fully drawn in graph. I can add a comment.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>