octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #55052] Memory consumption of figure command g


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #55052] Memory consumption of figure command going up significantly from 4.2 to 4.4
Date: Fri, 20 Jan 2023 12:22:42 -0500 (EST)

Follow-up Comment #13, bug #55052 (project octave):

On my debian system with Qt 5.15.8 and Mesa 22.3.3, I'm seeing the following
results with a build from a recent revision on the stable branch (hg id
9ab31fe294c1):


>> memory
Octave is running on x86_64-pc-linux-gnu
System    RAM: 131835716 kiB,  swap: 259136504 kiB
Octave    RAM:    194512 kiB,  virt:   5663004 kiB
Free      RAM:  10830144 kiB,  swap: 259088376 kiB
Available RAM: 128627160 kiB, total: 387715536 kiB
>> figure; memory
Octave is running on x86_64-pc-linux-gnu
System    RAM: 131835716 kiB,  swap: 259136504 kiB
Octave    RAM:    258304 kiB,  virt:  10266868 kiB
Free      RAM:  10790900 kiB,  swap: 259088376 kiB
Available RAM: 128587928 kiB, total: 387676304 kiB
>> figure; memory
Octave is running on x86_64-pc-linux-gnu
System    RAM: 131835716 kiB,  swap: 259136504 kiB
Octave    RAM:    279416 kiB,  virt:  10289752 kiB
Free      RAM:  10766080 kiB,  swap: 259088376 kiB
Available RAM: 128563108 kiB, total: 387651484 kiB
>> figure; memory
Octave is running on x86_64-pc-linux-gnu
System    RAM: 131835716 kiB,  swap: 259136504 kiB
Octave    RAM:    295860 kiB,  virt:  10307184 kiB
Free      RAM:  10746820 kiB,  swap: 259088376 kiB
Available RAM: 128543848 kiB, total: 387632224 kiB
>> figure; memory
Octave is running on x86_64-pc-linux-gnu
System    RAM: 131835716 kiB,  swap: 259136504 kiB
Octave    RAM:    312404 kiB,  virt:  10323900 kiB
Free      RAM:  10723460 kiB,  swap: 259088376 kiB
Available RAM: 128520488 kiB, total: 387608864 kiB


Initially, the usage appears to be about 65MB but then is around 15MB per
figure after that.  Is that too large?  I don't know.  there's a lot going on
behind the scenes for each figure.

Since this bug was initially about Octave 4.4 vs. 4.2, I will note that Octave
4.2 could only use the (now obsolete) QGLWidget but 4.4 could use that or the
newer QOpenGLWidget.  Maybe that change accounts for the increased memory
usage?

If anyone is interested in investigating further, it is still possible for
Octave 8 to use QGLWidget if QOpenGLWidget is not available.  You could also
force QGLWidget to be used if you edit config.h after running configure
(there's no configure option for this choice, just change it so that
HAVE_QOPENGLWIDGET, HAVE_QOFFSCREENSURFACE, and HAVE_QT_OFFSCREEN are
undedefined).  When I do that, I see reduced memory usage for each figure:


>> memory
Octave is running on x86_64-pc-linux-gnu
System    RAM: 131835716 kiB,  swap: 259136504 kiB
Octave    RAM:    194744 kiB,  virt:   5664384 kiB
Free      RAM:  10848360 kiB,  swap: 259088376 kiB
Available RAM: 128641652 kiB, total: 387730028 kiB
>> figure; memory
Octave is running on x86_64-pc-linux-gnu
System    RAM: 131835716 kiB,  swap: 259136504 kiB
Octave    RAM:    235316 kiB,  virt:  10245632 kiB
Free      RAM:  10821520 kiB,  swap: 259088376 kiB
Available RAM: 128614764 kiB, total: 387703140 kiB
>> figure; memory
Octave is running on x86_64-pc-linux-gnu
System    RAM: 131835716 kiB,  swap: 259136504 kiB
Octave    RAM:    246848 kiB,  virt:  10258692 kiB
Free      RAM:  10803804 kiB,  swap: 259088376 kiB
Available RAM: 128597048 kiB, total: 387685424 kiB
>> figure; memory
Octave is running on x86_64-pc-linux-gnu
System    RAM: 131835716 kiB,  swap: 259136504 kiB
Octave    RAM:    253460 kiB,  virt:  10266040 kiB
Free      RAM:  10791584 kiB,  swap: 259088376 kiB
Available RAM: 128584828 kiB, total: 387673204 kiB
>> figure; memory
Octave is running on x86_64-pc-linux-gnu
System    RAM: 131835716 kiB,  swap: 259136504 kiB
Octave    RAM:    260384 kiB,  virt:  10273712 kiB
Free      RAM:  10785972 kiB,  swap: 259088376 kiB
Available RAM: 128579216 kiB, total: 387667592 kiB


That appears to be about 7MB per figure (after the first).

Since this difference is due only to a change in Qt widgets and the old
QGLWidget is considered obsolete, I don't see what we can (easily) do about
it.  I don't think we really want to write our own version of QOpenGLWidget...


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55052>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]