Am Montag, den 24.11.2008, 15:10 +0100 schrieb Koen Deforche: > Hey Goetz, Hello Koen,
> 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? With 2.1.5 it was a problem (20MB), but not that burning... > What do you mean by using 36MB of RAM? Is this total mapped memory? VmData(36532K) + VmStack(84K) > How did you determine this? > Is this the memory usage you get with a single session? The new data (2.2.1) was measured without a single session... > You should probably also differentiate between shared (rx) en > non-shared (rw) memory segments? Only stack and heap... > > 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!) We are already running with a small stack. At the moment the stack size is not our problem. But I will reduce the number of threads... > 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 I changed our code to not draw hidden objects that aren't needed for some other reason... > - store WString data in message resources, and do not persist the > bundle in memory, by using WMessageResourceBundle::use(..., false); I'll try that... > - 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. I'll have to look into that ... Goetz -- Goetz Babin-Ebell <[EMAIL PROTECTED]> 4G Systems GmbH & Co KG ------------------------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
