Bug 158220 - Web Inspector: Snapshot List items do not respect the timeline recording's selected interval
Summary: Web Inspector: Snapshot List items do not respect the timeline recording's se...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Matt Baker
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-05-30 17:06 PDT by Brian Burg
Modified: 2016-12-13 15:37 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian 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 Brian 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.