Gah i should learn to use reply all
---------- Forwarded message ----------
From: Alessandro Decina <alessandro.d@...>
Date: Thu, Aug 27, 2009 at 12:29 PM
Subject: Re: [PiTiVi] waveform generation performance
To: brandon <brandon_lewis@...>
On Thu, Aug 27, 2009 at 4:37 AM, brandon<brandon_lewis@...> wrote:
> I've started working on porting the waveform code to a C python
> extension. It's been a bit slow-going at first because i'm learning the
> C Python API, distutils, etc, at the same time, but I've made some
> progress. I expect that I'll have some usable routines within a couple
> of days. The question then becomes how to incorporate this extension
> into PiTiVi.
do you have profile stats (see the cProfile module) output that shows what
is taking time? Last time i profiled the code I came to the opposite conclusion,
that it isn't worth at all rewriting that code in C given that performances were
being dominated 1) by the drawing (inside cairo) and 2) resampling.
The solution for 1) like you said would be probably to use a different
draw the waveforms, which imo should be done in python first and then moved to
C _if_ we see python is the bottleneck.
The solution for 2) is to avoid resampling at all. This could be done by making
array sink smarter or like I already suggested by using the level element which
has an option to do that.