discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Performance diff between Null Sink & Copy Block


From: Luke Berndt
Subject: [Discuss-gnuradio] Performance diff between Null Sink & Copy Block
Date: Mon, 16 Feb 2015 15:17:12 -0500

Hi - I am trying to create optional paths in my Gnuradio Flowgraph. I have 
found 2 ways of doing this in C++:
 - Doing a lock() / unlock() inside my heir_block2 and either connecting the 
items inside the block to the source of the block or connecting the source of 
the block to a null_sink.
- Putting a gr::blocks::copy inside my heir_block2 and either enabling or 
disabling when I want samples to go through the block.

With the null_sink I get almost no CPU load when the source is connect to the 
Null Sink. However with the Copy block I get a decent amount of CPU load when 
the block is set to disable.

I looked at the code and looks like a Copy Block set to disable is about the 
same as a Null Sink. they both just do nothing with the incoming samples.

Why is the Copy Block using so much more CPU? Is it possible for it to have the 
same CPU load as a null sink?

Is there are better way of doing this? Should I write a custom block?

Thanks,

Luke


reply via email to

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