[CMI.PM] Re: Perl Debugger and finding CPU Usage

Mitch Kutzko mitch at ncsa.uiuc.edu
Fri Nov 7 22:24:30 CST 2003


At 09:35 PM 11/7/2003 -0600, Arun Bhalla wrote:
> Well, I think now it's time to look at the code.  I've never seen Net::RTP
> before.  It looks like rtp_recv is either inefficient or is being
> used incorrectly.  Perhap you can look through the Net::RTP code and
> figure out what's going on.

Hi, Arun....

The Net::RTP code is the RAT (Robust Audio Tool) rtp.c common library
(v1.2.14) run through SWIG to make it available to Perl.  It should be
pretty solid, since it's recent, and it's been pounded on a bunch for a
long time by lots of folks.

However, I'm wondering about my call to it.  I had trouble with the socket
stuff earlier on, where I wasn't getting all the data from the connection
-- This seemed to clear it up, but now I wonder if it's not hanging up
somewhere.  Does this look clean to you?



# Continue to loop until rtp_recv returns FALSE -- Read 
# *all* the data, not just one packet's worth.
# 	Args: What are we listening to, how long can we block, and when did we
get it?
while (rtp_recv($session, $timeout, $rtp_ts)) { 
	rtp_update($session);
}


Thanks again!

Mitch
--
Mitch Kutzko | mitch at dast.nlanr.net | mitch at ncsa.uiuc.edu | 217-333-1199
http://hobbes.ncsa.uiuc.edu/



More information about the Champaign-Urbana mailing list