discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Slow message queues... How to speed up?


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] Slow message queues... How to speed up?
Date: Wed, 18 Mar 2009 09:59:43 -0700
User-agent: Mutt/1.5.18 (2008-05-17)

On Wed, Mar 18, 2009 at 09:44:05AM -0700, E. Ornelas wrote:
> 
> Hello!
> 
> I'm trying to write a program that read data from the usrp, then preforms a
> fft and plots
> the values of the maximum frequency and correspondent amplitude in real
> time.
> 
> I've come across this problem:
> - At first I was using vector_sink but it gave me problems with memory
> management, always
> crashing after a few moments.
> - Now I've implemented a message queue system. With a queue for the
> frequency values and
> one for the amplitude.
> - I've noticed that it became much slower (about 10 fft's per second, 2 per
> message)
> - I need to have a much higher number to do what I want in the final version
> 
> Is there any way to speed up the process? (Have more values per message or
> more messages per second maybe..)

First off, depending on the machine you are running this on, you may
or may not have enough cycles to get the job done.

You want to do as little as possible in python.  That is, be sure that
there's no python on the critical path.

Consider writing a C++ block that scans the fft output vectors and
computes the value that you want.  It sounds like you want something
that looks at each fft output vector, and for each vector returns the
index of the bin with the most power, and the magnitude of that bin.

Eric




reply via email to

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