WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
37879
Web Inspector: support heap graph in Timeline panel
https://bugs.webkit.org/show_bug.cgi?id=37879
Summary
Web Inspector: support heap graph in Timeline panel
Yury Semikhatsky
Reported
2010-04-20 11:50:45 PDT
Timeline panel should display JS heap size graph.
Attachments
screenshot of used heap graph in Overview pane
(186.02 KB, image/png)
2010-04-22 12:18 PDT
,
Ilya Tikhonovsky
no flags
Details
Screenshot
(77.42 KB, image/png)
2010-04-23 02:55 PDT
,
Yury Semikhatsky
no flags
Details
Original mock up
(25.79 KB, image/png)
2010-04-23 08:20 PDT
,
Timothy Hatcher
no flags
Details
proposed Timeline panel layout with Timelines and Memory tabs
(243.60 KB, image/png)
2010-04-26 07:02 PDT
,
Yury Semikhatsky
no flags
Details
Record filters moved to the status bar, CPU/Memory switch like in Resources panel
(411.89 KB, image/png)
2010-04-28 08:41 PDT
,
Yury Semikhatsky
no flags
Details
patch
(21.38 KB, patch)
2010-04-30 08:29 PDT
,
Yury Semikhatsky
no flags
Details
Formatted Diff
Diff
Screenshot for the patch
(117.92 KB, image/png)
2010-04-30 08:32 PDT
,
Yury Semikhatsky
no flags
Details
patch
(27.80 KB, patch)
2010-05-12 11:18 PDT
,
Yury Semikhatsky
no flags
Details
Formatted Diff
Diff
Safari screenshot for the patch
(27.80 KB, application/octet-stream)
2010-05-12 11:19 PDT
,
Yury Semikhatsky
no flags
Details
Safari screenshot for the patch
(178.79 KB, image/png)
2010-05-12 11:29 PDT
,
Yury Semikhatsky
no flags
Details
patch
(31.60 KB, patch)
2010-05-18 06:59 PDT
,
Yury Semikhatsky
no flags
Details
Formatted Diff
Diff
Safari screenshot for the patch
(176.10 KB, image/png)
2010-05-18 07:00 PDT
,
Yury Semikhatsky
no flags
Details
Screenshot with only max heap size in the top left corner
(130.39 KB, image/png)
2010-05-20 11:19 PDT
,
Yury Semikhatsky
no flags
Details
Safari screenshot with only max heap size in the top left corner
(174.48 KB, image/png)
2010-05-20 11:48 PDT
,
Yury Semikhatsky
no flags
Details
Safari,max heap size in a div in the top left corner
(163.65 KB, image/png)
2010-05-21 02:38 PDT
,
Yury Semikhatsky
no flags
Details
patch
(31.97 KB, patch)
2010-05-24 07:55 PDT
,
Yury Semikhatsky
pfeldman
: review+
Details
Formatted Diff
Diff
Show Obsolete
(8)
View All
Add attachment
proposed patch, testcase, etc.
Ilya Tikhonovsky
Comment 1
2010-04-22 12:18:32 PDT
Created
attachment 54084
[details]
screenshot of used heap graph in Overview pane
Timothy Hatcher
Comment 2
2010-04-22 12:24:48 PDT
I think this is toomuch overloading and the user has no indication/label telling them what this graph is in the background. I would rather see a 4th row that has a shorter graph.
Timothy Hatcher
Comment 3
2010-04-22 12:25:22 PDT
Having a 4th row will allow it to have a proper label.
Ilya Tikhonovsky
Comment 4
2010-04-22 12:56:38 PDT
(In reply to
comment #2
)
> I think this is toomuch overloading and the user has no indication/label > telling them what this graph is in the background. > > I would rather see a 4th row that has a shorter graph.
there is very small space for the graph. Right now it is just 60px. In any case it is not informative at all. I think it would be much useful to have the same behavior as in google finance.
Yury Semikhatsky
Comment 5
2010-04-23 02:55:21 PDT
Created
attachment 54142
[details]
Screenshot We were also thinking about adding a tab that would replace three event timeline overviews with one heap graph. This way user would be able to focus on the heap graph and then narrow timeline window to find out what caused heap spikes.
Timothy Hatcher
Comment 6
2010-04-23 08:16:52 PDT
This version is confusing to me. Records do no smothly transition into the the next one, they start and stop. But your graph implies they ramp up and down over time. It should really be steps up and down with no smooth transition. (Make sense?) But steps would look even uglier… I's prefer seperate rows like it was originally, with gradients that darken/lighten in the bar to show intensity for that period of time.
Timothy Hatcher
Comment 7
2010-04-23 08:19:42 PDT
The design I mentioned was mocked up long ago when the Timeline panel was being designed. It was just never implemented. See the attachment.
Timothy Hatcher
Comment 8
2010-04-23 08:20:16 PDT
Created
attachment 54162
[details]
Original mock up
Timothy Hatcher
Comment 9
2010-04-23 08:33:13 PDT
Ok, so I was really confused. Your mock up uses the same colors for the heap grap as Scripting and Renderting. And you kept the labels for the record types, making me think the graph was matching those labels. Ignore my idea then, but we should implemet it sometime, with the time summaries.
Timothy Hatcher
Comment 10
2010-04-23 08:37:07 PDT
Why are there two numbers for heap anyway? I never understood this.
Pavel Feldman
Comment 11
2010-04-23 08:42:56 PDT
(In reply to
comment #9
)
> Ok, so I was really confused. Your mock up uses the same colors for the heap > grap as Scripting and Renderting. And you kept the labels for the record types, > making me think the graph was matching those labels. > > Ignore my idea then, but we should implemet it sometime, with the time > summaries.
This is just a wip patch and screenshot. It is about _optionally_ enabled heap graphs. The idea is that we can switch between overview bars and heap graph there. Colors are random I guess. Should be blue and gray, semitransparent. (In reply to
comment #10
)
> Why are there two numbers for heap anyway? I never understood this.
Lower is objects allocated in the heap, higher is memory allocated for the heap. When we get out of memory we do GC and in not successful, we request more memory for the VM.
Yury Semikhatsky
Comment 12
2010-04-26 07:02:06 PDT
Created
attachment 54292
[details]
proposed Timeline panel layout with Timelines and Memory tabs We discussed this a bit and come up with the layout captured on the screenshot. User can switch between memory and cpu view in the timeline overview area. The area itself is stretched to the width of its container and all filters are moved to the toolbar above it.
Timothy Hatcher
Comment 13
2010-04-26 08:03:01 PDT
You have disconnected the summary bar colors and the checkboxes, so you have no clues what the colors mean. I am not sure why memory has to go in this area of the panel. What if there was a special row (or rows) in the record area that zoom and move with the other records. You could have a small summary line in the top area too.
Pavel Feldman
Comment 14
2010-04-26 08:05:01 PDT
(In reply to
comment #13
)
> You have disconnected the summary bar colors and the checkboxes, so you have no > clues what the colors mean. > > I am not sure why memory has to go in this area of the panel. What if there was > a special row (or rows) in the record area that zoom and move with the other > records. > > You could have a small summary line in the top area too.
Mock! Mock!
Timothy Hatcher
Comment 15
2010-04-26 08:05:46 PDT
I'll try later today.
Yury Semikhatsky
Comment 16
2010-04-28 08:41:16 PDT
Created
attachment 54568
[details]
Record filters moved to the status bar, CPU/Memory switch like in Resources panel Another option: move record filters to the status bar, switch between CPU/Memory view much like Size/Time in Resources panel.
Timothy Hatcher
Comment 17
2010-04-28 09:21:32 PDT
I like this approch. Except anchor the checkboxes along the divider line, like we anchor the view buttons in the Pofiles panel.
Yury Semikhatsky
Comment 18
2010-04-30 08:29:31 PDT
Created
attachment 54804
[details]
patch
Yury Semikhatsky
Comment 19
2010-04-30 08:32:02 PDT
Created
attachment 54805
[details]
Screenshot for the patch
Timothy Hatcher
Comment 20
2010-04-30 09:13:07 PDT
What is being shown in the console? Why are there magnifying glasses next to each log?
Timothy Hatcher
Comment 21
2010-04-30 10:54:00 PDT
Comment on
attachment 54804
[details]
patch How will this look in Safari/WebKit where the heap graph isn't supported. Is it too much to ask for the look to not change if heap isn't supported?
Pavel Feldman
Comment 22
2010-05-02 06:29:26 PDT
(In reply to
comment #21
)
> (From update of
attachment 54804
[details]
) > How will this look in Safari/WebKit where the heap graph isn't supported. > > Is it too much to ask for the look to not change if heap isn't supported?
It is not too much, but it would be a through away work. Knowing that JSC folks most likely have this information in hand makes this approach not that appealing. So other options are: 1) We remove Memory item as a whole when there is no support for heap. The only drawback is the area under the large timeline item. (which is to be occupied soonish) 2) we remove both items to the left, making entire top area an overview. Window resizers become less usable, but new "drag to select" functionality mitigates it. If you don't like them, we'll support the dual-mode.
Timothy Hatcher
Comment 23
2010-05-02 07:21:03 PDT
Does the patch currently do 1? If not we shouldn't land it until option 1 is done.
Pavel Feldman
Comment 24
2010-05-02 09:22:16 PDT
(In reply to
comment #23
)
> Does the patch currently do 1? If not we shouldn't land it until option 1 is > done.
We discussed with Yury that it is necessary, but I am not sure whether it is in the patch already. Do you think it is Ok to land given that it is done? (Yury is on vacations, I might need to finish this for him).
Yury Semikhatsky
Comment 25
2010-05-03 00:47:07 PDT
(In reply to
comment #24
)
> (In reply to
comment #23
) > > Does the patch currently do 1? If not we shouldn't land it until option 1 is > > done. > > We discussed with Yury that it is necessary, but I am not sure whether it is in > the patch already.
It's not in the patch yet. I can implement any of discussed options when I'm back from vacation(I have limited internet connection here). Personally I don't like the option 1) as it would add a useless control(Timelines button) to the overview area.
Yury Semikhatsky
Comment 26
2010-05-12 11:18:59 PDT
Created
attachment 55874
[details]
patch
Yury Semikhatsky
Comment 27
2010-05-12 11:19:38 PDT
Created
attachment 55875
[details]
Safari screenshot for the patch
Timothy Hatcher
Comment 28
2010-05-12 11:22:43 PDT
You attached the patch again, not the screenshot.
Yury Semikhatsky
Comment 29
2010-05-12 11:29:51 PDT
Created
attachment 55877
[details]
Safari screenshot for the patch Sorry about that, here is the screenshot
Pavel Feldman
Comment 30
2010-05-13 12:16:40 PDT
Comment on
attachment 55874
[details]
patch No real problems, but numerous nits. Clearing the r flag and looking forward to your fixes. WebCore/inspector/front-end/Drawer.js:43 + this._countItems = document.getElementById("count-items"); itemsCounter? WebCore/inspector/front-end/Drawer.js:118 + var newRight = 25; // margin-right value when the counter is on main status bar Please declare it as a constant and refer to the style it depends on. Can we actually get rid of it? WebCore/inspector/front-end/Drawer.js:119 + var rightPadding = (oldRight - newRight) - 2; Same here. Is this a border? Which style does it belong to? Can we get rid? WebCore/inspector/front-end/Drawer.js:258 + this._currentPanelCounters = null; delete this._currentPanelCounters WebCore/inspector/front-end/Settings.js:33 + heapInfoAvailable: false, Looks like we have a great hint on how to make this available in jsc. Might be easier to support it there than to fork behavior. WebCore/inspector/front-end/TimelineOverviewPane.js:94 + this._overviewGrid.element.replaceChild(this._overviewGrid.itemsGraphsElement, this._heapGraphElement); We usually manage cases like this using "hidden" style and leaving DOM structure as is. WebCore/inspector/front-end/TimelinePanel.js:36 + var overviewPanelElement = document.createElement("div"); I think these should no longer have overview prefix in their names. WebCore/inspector/front-end/TimelineOverviewPane.js:181 + updateHeapGraph: function(records) We might want to extract this into a separate class that will be further used for rendering selected window's heap details.
Yury Semikhatsky
Comment 31
2010-05-18 06:59:41 PDT
Created
attachment 56368
[details]
patch
Yury Semikhatsky
Comment 32
2010-05-18 07:00:09 PDT
Created
attachment 56369
[details]
Safari screenshot for the patch
Yury Semikhatsky
Comment 33
2010-05-18 07:04:57 PDT
(In reply to
comment #30
)
> (From update of
attachment 55874
[details]
) > No real problems, but numerous nits. Clearing the r flag and looking forward to your fixes. > > WebCore/inspector/front-end/Drawer.js:43 > + this._countItems = document.getElementById("count-items"); > itemsCounter? >
Renamed.
> > WebCore/inspector/front-end/Drawer.js:118 > + var newRight = 25; // margin-right value when the counter is on main status bar > Please declare it as a constant and refer to the style it depends on. Can we actually get rid of it?
> Introduced a constant. I don't see how we can easily get access to the margin value without creating invisible elements and taking their positions.
> WebCore/inspector/front-end/Drawer.js:119 > + var rightPadding = (oldRight - newRight) - 2; > Same here. Is this a border? Which style does it belong to? Can we get rid?
> It was left-padding value, I changed style declaration and removed the constant from code.
> WebCore/inspector/front-end/Drawer.js:258 > + this._currentPanelCounters = null; > delete this._currentPanelCounters >
Done.
> WebCore/inspector/front-end/Settings.js:33 > + heapInfoAvailable: false, > Looks like we have a great hint on how to make this available in jsc. Might be easier to support it there than to fork behavior.
> Done. Now that Ilya implemented basic heap info in JSC I can reuse it.
> WebCore/inspector/front-end/TimelineOverviewPane.js:94 > + this._overviewGrid.element.replaceChild(this._overviewGrid.itemsGraphsElement, this._heapGraphElement); > We usually manage cases like this using "hidden" style and leaving DOM structure as is. >
Done.
> WebCore/inspector/front-end/TimelinePanel.js:36 > + var overviewPanelElement = document.createElement("div"); > I think these should no longer have overview prefix in their names. >
Done. Renamed to topPane... as was discussed offline.
> WebCore/inspector/front-end/TimelineOverviewPane.js:181 > + updateHeapGraph: function(records) > We might want to extract this into a separate class that will be further used for rendering selected window's heap details.
Extracted class.
Pavel Feldman
Comment 34
2010-05-20 10:17:00 PDT
I find screenshot confusing. Graph is drawn outside the axis.
Yury Semikhatsky
Comment 35
2010-05-20 11:19:46 PDT
Created
attachment 56613
[details]
Screenshot with only max heap size in the top left corner Do you like better when only max heap size is shown in the top left corner without the scale?
Yury Semikhatsky
Comment 36
2010-05-20 11:48:16 PDT
Created
attachment 56617
[details]
Safari screenshot with only max heap size in the top left corner Heap graph has additional 5px offset from time axis above it.
Pavel Feldman
Comment 37
2010-05-20 18:18:19 PDT
For some reason Safari does not have the bounding stroke, only the blueish fill. Is there anything wrong with your canvas code? Also I don't really like the way graph goes to the right - it feels truncated. + Canvas-based rendering of the size looks inconsistent with the rest of the text.
Yury Semikhatsky
Comment 38
2010-05-21 00:02:00 PDT
(In reply to
comment #37
)
> For some reason Safari does not have the bounding stroke, only the blueish fill. Is there anything wrong with your canvas code?
I was experimenting with another graph presentation - the one without the grey border, it has more smooth edge compared to the previous screenshots.
> Also I don't really like the way graph goes to the right - it feels truncated.
We could add a padding between the graph right border and the panel right bound. We'd need to change the time axis in that case. What do you think about it?
> Canvas-based rendering of the size looks inconsistent with the rest of the text.
I'll move it into a div.
Yury Semikhatsky
Comment 39
2010-05-21 02:38:08 PDT
Created
attachment 56687
[details]
Safari,max heap size in a div in the top left corner Moved heap size label into a div.
Yury Semikhatsky
Comment 40
2010-05-24 07:55:53 PDT
Created
attachment 56887
[details]
patch
Yury Semikhatsky
Comment 41
2010-05-25 00:52:26 PDT
Committed
r60141
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug