Plot performance fix: Buffering the graphics?

67 views
Skip to first unread message

KreAture

unread,
Sep 11, 2010, 5:14:04 PM9/11/10
to freemat-devel
I've been trying out some plotting in Freemat and have run int some
issues that I feel could be fixed by buffering the graphics.

Basically if you have a complex plot, or the plot contains a lot of
datapoints it can take a very long time to draw on even a powerfull
computer. When you jump to another app and back to the plot window it
again takes almost equally as long to redraw the window. Same happens
if you move it or resise it.
I feel this should be addressed by plotting to a graphics buffer so
that the redraw only re-displays the buffer in most cases. When
resizing window, the buffer is scaled and displayed instantly. Then
the redraw can happen in background to improve display quality.

This extra buffering might also speed up general drawing which is very
slow at the moment.

EI

unread,
Sep 14, 2010, 3:22:56 AM9/14/10
to freema...@googlegroups.com
Which version of FreeMat are you using? Which OS? We've had some problems with slow graphics some time ago, but I think that was resolved (redraw was called too often). I haven't experience slow drawing lately with 2D data.

If you are interested in implementing double buffering I can walk you through and answer questions about the related parts of the code.

Eugene

KreAture

unread,
Sep 14, 2010, 6:43:23 PM9/14/10
to freemat-devel
I'm running Freemat 4.0 just downloaded from the download pages.
I run it on a Core2 Duo with Windows XP x64 on 4GB memory using a
GeForce 6800 graphics adapter.

The dataset I am plotting is a single x/y graph of 76000 points.
The odd thing is ofcource that when I now try to time the alt-tab
switches to/from plot window they are only 2-3 seconds long.
They were much longer so apparantly something changed. (And I didn't
reboot...)
(The fresh plotting of the same dataset is also much quicker now.)

Maby something else was bogging down my system the last week.
Will investigate a bit further. Thanks for the insight and offer
though.

Kyrre

gerhar...@gmail.com

unread,
May 16, 2013, 4:19:36 AM5/16/13
to freema...@googlegroups.com
FWIW, I just tried FreeMAT 4.2 on Windows 7 and plotting is 
unusable for practical purposes.

Tried a simple plot() with 8000 data points.

Observations:
Zooming in takes a looooong time, the larger the zoom level, the longer it takes.
After two zooms, the plot UI would freeze and the main window with it.  Had
to kill it using the task manager.

Really a pity, since otherwise the tool seems nice and well-documented.

Still, thanks for the good work!

Best
--Gerhard

Samit Basu

unread,
May 16, 2013, 10:42:29 PM5/16/13
to freemat-devel
Hmmm... OK - sorry to hear that.  I'll take a look at the plotting code and see if anything looks problematic.  We recently switched from OpenGL to Qt rendering because of issues on Windows.  That may have cause the issue.

Samit


--
You received this message because you are subscribed to the Google Groups "freemat-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to freemat-deve...@googlegroups.com.

To post to this group, send email to freema...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

gerhar...@gmail.com

unread,
May 17, 2013, 1:37:21 PM5/17/13
to freema...@googlegroups.com
OK, thanks for taking a look!

Should be easy to reproduce, just take a very simple plot with ~10000 plots.
If you cannot reproduce, I can send you detailed repro steps.

Best
--Gerhard
Reply all
Reply to author
Forward
0 new messages