Bug 158220

Summary: Web Inspector: Snapshot List items do not respect the timeline recording's selected interval
Product: WebKit Reporter: BJ Burg <bburg>
Component: Web InspectorAssignee: Matt Baker <mattbaker>
Status: NEW ---    
Severity: Normal CC: graouts, inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   

Description BJ Burg 2016-05-30 17:06:52 PDT
This doesn't seem like expected behavior in any use case.
Comment 1 Radar WebKit Bug Importer 2016-05-30 17:07:03 PDT
<rdar://problem/26545050>
Comment 2 Joseph Pecoraro 2016-05-31 11:10:36 PDT
This was actually intentional.

There are multiple ways to take a heap snapshot outside of a recording:

    1. console.takeHeapSnapshot
    2. The "Take snapshot" button in the JavaScript Allocations Timeline View

In both cases, the "new snapshot" is unlikely to appear in your selected time range. Yet the developer that triggered it, will likely want to see it. Especially in (2) given that they just performed a very explicit user interaction to get it.

I think the number of heap snapshots should be pretty small. It wouldn't (or shouldn't) be thousands like other timelines. But rather a handful or tens.
Comment 3 BJ Burg 2016-05-31 12:08:46 PDT
(In reply to comment #2)
> This was actually intentional.
> 
> There are multiple ways to take a heap snapshot outside of a recording:
> 
>     1. console.takeHeapSnapshot
>     2. The "Take snapshot" button in the JavaScript Allocations Timeline View
> 
> In both cases, the "new snapshot" is unlikely to appear in your selected
> time range. Yet the developer that triggered it, will likely want to see it.
> Especially in (2) given that they just performed a very explicit user
> interaction to get it.
> 
> I think the number of heap snapshots should be pretty small. It wouldn't (or
> shouldn't) be thousands like other timelines. But rather a handful or tens.

I can understand that argument, but my experience when trying to use this with lots of screenshots is that it quickly becomes unusable. This is especially so if the snapshots are taken from the same call site and have the same label. If the page programmatically takes a snapshot before/after some event or interaction you want correlate (via JS or user timeline events) there's no way to tell apart the snapshots relevant to a single interaction.

I think we should make it consistent with every other timeline view. We can add other UI hints, such as changing the "Snapshot List" component for the subview to say "Snapshot List (5 filtered)" or something similar.

Another idea (which is probably not necessary here) is to add "perimeter" hints along the left and right edge of the timeline graphs to show how many records/snapshots are scrolled out of view.