Summary: | Web Inspector: console.takeHeapSnapshot takes snapshots even if allocations timeline is not enabled or not recording | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | BJ Burg <bburg> | ||||
Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | NEW --- | ||||||
Severity: | Normal | CC: | graouts, inspector-bugzilla-changes, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
I think this is expected. Like other console commands, they do nothing if Web Inspector is not open, but do things when Web Inspector is open. The same here. Requiring that someone be recording would be rather annoying. That said, I can see how showing the [S] in the Timeline randomly popping up would be rather annoying. Poke for the importer. This does match console.profile, which is the behavior I talked to Joe about following. I would consider this behaves correctly. (In reply to comment #3) > This does match console.profile, which is the behavior I talked to Joe about > following. I would consider this behaves correctly. Ok. I did find it very jarring to see my timeline fill up with snapshots without having done anything on my part. (In reply to comment #4) > (In reply to comment #3) > > This does match console.profile, which is the behavior I talked to Joe about > > following. I would consider this behaves correctly. > > Ok. I did find it very jarring to see my timeline fill up with snapshots > without having done anything on my part. But then, does toggling the Allocations timeline only change whether it's visible? No, console.takeHeapSnapshot forces it on. If that isn't used, it will remain off and high performance. I could buy the argument that console.profile and console.takeHeapSnapshot should only work if the timeline is already enabled. That way you can basically make console.profile and console.takeHeapSnapshot no-ops if you disable the right timelines. (In reply to comment #6) > No, console.takeHeapSnapshot forces it on. If that isn't used, it will > remain off and high performance. > > I could buy the argument that console.profile and console.takeHeapSnapshot > should only work if the timeline is already enabled. That way you can > basically make console.profile and console.takeHeapSnapshot no-ops if you > disable the right timelines. I would like there to be a way to disable it from within the inspector, otherwise it will cause GC to take way longer, and we wouldn't be able to get useful script profiles. |
Created attachment 279806 [details] [HTML] reduction STEPS TO REPRODUCE: 0. Open the page 1. Open the inspector 2. Show the allocations timeline EXPECTED: Nothing shows up ACTUAL: Lots of snapshots populate the timeline even if not recording