Poor speed of wx.lib.plot

Have you looked at matplotlib (matplotlib.sf.net)? I've just started
playing with it but it seems really nice.

Also, maybe the DrawLinesList wrapper function will show better
performance. How is the performance of the DrawXXXList demo (under
"miscellaneous")?

···

On Thu, 12 Aug 2004 15:58:56 -0600, Hubbard, Gary <ghubbar@sandia.gov> wrote:

Hi,

I regularly work with large, scientific, data sets that I need to plot. I
have looked into several existing packages, and have been very unhappy with
the speed of each of them. Upon more careful examination I have decided
that the entire problem must lie within the calls to dc.DrawLines().

Looking at wx.lib.plot, which would probably be a fine starting place for
me, the comments indicate that they got 0.078 s to draw a 25,000 point
vector. Modifying the code in draw4 to only draw zero width lines and no
markers, gave me about 0.400 sec on a relatively good computer (2.8 GHz P4).
Can anybody else reproduce anything like the indicated speed. I am running
Python 2.3.4, wxPython 2.5.1 under WinXP.

Without actually setting up to debug the C parts of wxPython, I have come to
the conclusion that the problem is probably almost entirely in the
translation of the passed wxPoint array into the C++ equivalent. I have a
numarray (1.0) array of integers, which is effectively the data already
laid out like the underlying C++ API eventually needs it, but the helper
routines go through a huge amount of work, ripping things apart one value at
a time and reconstructing them again. It seems like there should be a way
for wxPoint_LIST_helper to accept some sort of pre-constructed memory buffer
which is assumed to be properly built. For example, if the incoming data
type is a string assume that it is an array of integers x0, y0, x1, y1, ...
and use it directly.

If I am completely off base about where the time is being consumed this kind
of change might not help at all, but other than the Win32 layers itself I
can't see anything else that could explain it.

Gary

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org