mica
mica

Reputation: 4308

Memory usage in gwt

I´m new to GWT and have a few questions about memory usage in GWT.

Is it possible to detect, how much memory is left in the gwt client (browser)? Is there an event if the browsers memory gets low, as a signal to free resources?

Is there a known approximation value how much memory can be used in different browsers, especially mbile ones?

Tnx

Upvotes: 3

Views: 1353

Answers (2)

appbootup
appbootup

Reputation: 9537

I have not come across a browser api to do so. You can approach this problem in another way by designing an app low memory footprint. The profiling techniques to achieve a performance optimal app would be as follows -

  1. Track memory footprint of GWT app for dev windows by a primitive approach. Open/Navigate Task Manager -> Performance -> PF usage .

  2. Use memory profiler from chrome

    A. https://developers.google.com/chrome-developer-tools/docs/profiles

    B. https://developers.google.com/chrome-developer-tools/docs/memory-analysis-101

  3. Use memory profiler from firefox - Javascript memory profiler for Firefox

Upvotes: 2

kapandron
kapandron

Reputation: 3671

Your GWT code will be compiled and sent to client as JavaScript code. JS is constrained in a sandbox and doesn't provide way to find out how much memory is used by client browser.

But you can apply a trick and try to estimate weight of content of page and measure its load speed. So you can get very rough evaluation of performance client browser.

Upvotes: 0

Related Questions