Hey Goetz,

2008/11/24 Goetz Babin-Ebell <[EMAIL PROTECTED]>:
> Hello folks,
>
> With the actual WT release our application uses 36MB of RAM.
> Considering the fact that the system has only 32 MB at all,
> this is a major problem.

The way you phrase your question suggests you saw a big jump in memory
usage with the latest release?

What do you mean by using 36MB of RAM? Is this total mapped memory?
How did you determine this?
Is this the memory usage you get with a single session?

You should probably also differentiate between shared (rx) en
non-shared (rw) memory segments?

> Has anybody any idea how to minimize the memory footprint
> of an WT application ?

There are many possibilities...

There is some overhead by Wt itself which can be reduced in some
cases. Depending on your deployment, an unnecessary large amount of
memory can be consumed by (thread) stacks.
To reduce this, you can:
 - reduce number of threads
 - reduce stack sizes (on one linux distribution this was 8MB per stack!)

Then there is memory used by widgets. To get a low memory usage, here
are some tips:

 - only create widgets when they are actually drawn and visible on the screen
 - store WString data in message resources, and do not persist the
bundle in memory, by using WMessageResourceBundle::use(..., false);
 - wrap widgets that are not interactive (besides perhaps internal
path changes or client-side JavaScript), in a WViewWidget (see the
Wt-homepage example). These will only be created for rendering, but
not consume any memory resources otherwise.

Regards,
koen

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to