New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 637598 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Feature



Sign in to add a comment

Get memory footprint of any tab using a Stable Javascript API

Reported by 6po...@gmail.com, Aug 14 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36

Steps to reproduce the problem:
1. Watch several Youtube videos in the same tab.
2. 
3. 

What is the expected behavior?

What went wrong?
Very soon, the Youtube tab will eat 1 GB of RAM.
I'd like to create an extension that automatically closes any tab whose memory usage is greater than a specific value and only that tab. The problem is that current Stable Javascript API doesn't provide me any tools to measure memory usage of every tab. I know there's something interesting in Google Chrome Dev channel but it would be great if we could have the same thing in Stable channel as soon as possible.

Did this work before? N/A 

Chrome version: 52.0.2743.116  Channel: stable
OS Version: 
Flash Version: Shockwave Flash 22.0 r0
 
Cc: ashej...@chromium.org
Components: Blink>JavaScript
Status: Untriaged (was: Unconfirmed)
Marking the above issue as Untriaged as this is a new feature request.

Dev team will take a call on the above issue.

Thank you!
Components: -Blink>JavaScript Platform>DevTools>Memory
Not really V8 related.

Comment 3 by l...@chromium.org, Aug 19 2016

Cc: caseq@chromium.org alph@chromium.org
Owner: l...@chromium.org
Status: WontFix (was: Untriaged)
Hi 6pozmo@, making that Chrome extension sounds like a neat idea!

This isn't really a DevTools request, but more of a request for the API to expose the information you want.  DevTools has a 'Profiler' panel that lets you take heap snapshots on request, but it seems like you want a programmatic approach.  Have you checked out these?
https://docs.webplatform.org/wiki/apis/timing/properties/memory
https://developer.chrome.com/extensions/processes
^ in the 2nd link, search for "onupdatedwithmemory"

That should contain the memory usage details you're looking for.  If not, feel free to reach out to us or open a specific request in the future.

@alph, @caseq, please jump in if you know of any more APIs available for reading memory usage.

Comment 4 by 6po...@gmail.com, Aug 20 2016

The only reason I posted here is because I've been told to do so by moderators of Google Chrome forums.

Both of your suggested links are pretty useless for what I wanna do. As I already said, I use Google Chrome from Stable Channel while your second link would be useful only if I'd use Google Chrome Dev Channel.

I just wanted you to know that getting the memory usage of a tab using a Javascript API has its uses for any Google Chrome user (it can really make Chrome a more RAM friendly browser) and this is why we all should enjoy it as soon as possible in the future Google Chrome releases from Stable channel.

Sign in to add a comment