[Uml-devel] Big umbrello project causes X11 to take too much memory - current CVS
Achim.Spangler at mnet-online.de
Thu Jun 24 06:30:04 UTC 2004
I digged some time in the Qt-Doc and in the uml.h/cpp, umldoc.h/cpp and
Well, obviously my assumption on the parallel creation of a "hidden" graphical
representation for all diagrams seems to be right.
The QWidgetStack class in UMLApp is used to store instances of QCanvasView.
The documentation of Qt is not very clear in regard to memory efficiency of
the several methods to have
several QCanvas ( not QCanvasView ) instances
with everytime just one of them ( i.e. diagram )
visible on main display.
As far as I understand the relation between QCanvas and QCanvasView correct,
the diagram contents could be drawn into a QCanvas instance independend from
If a diagram shall be displayed, the corresponding QCanvas must be connected
to a visible QCanvasView.
If my reasoning is correct, then umbrello could reduce the memory usage ( in
X11!!! ) by changing
UMLApp 1 <---->n QCanvasView 1 <--> 1 QCanvas 1 <----> m QCanvasItem
( single graphic elements )
UMLApp 1 <---->1 QCanvasView 1 <--> n QCanvas 1 <----> m QCanvasItem
Therefore the code for control of visible and invisible diagrams would need a
change. As there are already several comments like "Obsolete??" or some
functions like UMLDoc::activateView() - ( just set m_bLoading = false; and
return constant true ), there is already some need for change.
Is anybody on the list ( or at least knows somebody ) a Qt expert, who can
tell the best way to manage several diagrams in a memory efficient way?
Am Donnerstag 24 Juni 2004 12:23 schrieb Achim Spangler:
> I'm not shure, if this effect was introduced previously into umbrello, or
> if this is only triggered by my growing project.
> My project ( xmi file ) is around 2 MB in size.
> If I load the project into umbrello, "top" tells me the following memory
> VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> 98452 46m 28m S 56.7 9.3 0:43.84 umbrello
> 615m 337m 46m S 2.9 67.0 3:32.83 X
> So while umbrellos memory usage is quite fine - in sum less than 80MB, the
> X server takes too much memory. As the memory usage is normal, as soon as I
> stop umbrello, this must be caused directly or indirectly by umbrello and
> my project. A smaller project ( with less diagrams ) doesn't cause such
> memory usage.
> This could be caused, if all diagrams are created in parallel drawing areas
> ( canvas ), and the event "Display diagram Foo" does only set the
> visibility flag of "Foo" to true, and false of all other diagrams.
> I thought until now, that only the currently displayed diagram is created
> within the X11 memory space.
> Can somebody explain this effect?
> This SF.Net email sponsored by Black Hat Briefings & Training.
> Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
> digital self defense, top technical experts, no vendor pitches,
> unmatched networking opportunities. Visit www.blackhat.com
> Uml-devel mailing list
> umbrello-devel at kde.org
More information about the umbrello-devel