NEW 158086
Web Inspector: console.takeHeapSnapshot takes snapshots even if allocations timeline is not enabled or not recording
https://bugs.webkit.org/show_bug.cgi?id=158086
Summary Web Inspector: console.takeHeapSnapshot takes snapshots even if allocations t...
Blaze Burg
Reported 2016-05-25 14:02:59 PDT
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
Attachments
[HTML] reduction (133 bytes, text/html)
2016-05-25 14:02 PDT, Blaze Burg
no flags
Joseph Pecoraro
Comment 1 2016-05-25 14:19:29 PDT
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.
Blaze Burg
Comment 2 2016-05-25 15:58:05 PDT
Poke for the importer.
Timothy Hatcher
Comment 3 2016-05-25 16:01:28 PDT
This does match console.profile, which is the behavior I talked to Joe about following. I would consider this behaves correctly.
Blaze Burg
Comment 4 2016-05-25 16:18:55 PDT
(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.
Blaze Burg
Comment 5 2016-05-25 16:19:35 PDT
(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?
Timothy Hatcher
Comment 6 2016-05-25 17:07:24 PDT
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.
Blaze Burg
Comment 7 2016-05-27 07:19:50 PDT
(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.
Radar WebKit Bug Importer
Comment 8 2016-05-27 07:24:20 PDT
Note You need to log in before you can comment on or make changes to this bug.