Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to measure Graphic Memory Usage of a WebGL application

I have seen several applications to profile DirectX and OpenGL applications, which measure Graphic Memory Usage. I were not able to find anything similar for WebGL.

I am using WebGLInspector to debug WebGL applications, but Graphic Memory Profiling is currently not supported.

Is there an alternative to track the exact Graphic Memory Usage of a WebGL application?

like image 870
Ben-G Avatar asked Nov 14 '11 22:11

Ben-G


People also ask

How do I check chrome memory?

Press Shift+Esc on a Chrome tab to open the Chrome Task Manager. You will see processes like Utility, Tab, Subframe, Rendere, Extensions, and so on. On the right side, you will find a memory footprint. This number indicates the RAM usage.

How do I access my browser memory?

You can use the Browser Task Manager (hit Shift+Esc on Windows or use Window > Task Manager on Mac) to see how much memory your tabs and browser extensions are using: You can also use the Memory tab in the F12 Developer tools to peek at heap memory usage.


2 Answers

For one, there's no way to query that with Javascript at this point. There's actually some security concerns, in that detailed GPU memory data could be used to create a system fingerprint for tracking without the users knowledge.

But I'm guessing you're more concerned about debugging your own app, not creating a monitoring tool. For that in Chrome at least you can derive some information from the about:memory tab. In there you'll see a "GPU" section that gives you a really high-level idea of the video memory usage for the browser. Yeah, that's the whole browser, not just your tab. But it's not that hard to make sure your tab is the only one running at the time for more accurate stats.

I'm sure that's not the answer that you want, but it's all we've got for the moment. Undoubtedly as WebGL becomes a bigger part of the web we'll evolve better tools for it, but until then... welcome to being an early adopter!

like image 95
Toji Avatar answered Oct 27 '22 00:10

Toji


You can view GPU Memory in chrome by More Tools->Task manager enter image description here

like image 29
Muhammad Faizan Khan Avatar answered Oct 26 '22 23:10

Muhammad Faizan Khan