On 2006-11-09, Grant Edwards <gra...@visi.com> wrote:

> I just did a bit of benchmarking, and the new binary is 30X
> slower.  Loading my 14K program into flash with the old binary
> took 22 seconds (5500bps).  With the new one, it takes 522
> seconds (223bps) -- that's almost 9 minutes.

Increasing the download packet size helps.  Now the new
gdbproxy is only 3X slower than the old one.

Why the 1s polling period on download packets in the new
gdbproxy?

It's got to be busy-waiting, since it's sucking up 100% of a
1.8GHz CPU while only sending 1 packet of 39 each second.  

The old binary obviously sends a new download packet as soon as
the previous one is ACKed, but the new one appears to wait
until the next 1-second tick to send the next packet.  That
imposes an average overahd of 500ms per packet.  No matter how
big the packets are, that's going to add up fast.

It wouldn't be so bad if it was sleeping for 1 second at a
time, but it's not -- it's burning an entire second of CPU time
doing nothing.

-- 
Grant Edwards                   grante             Yow!  They
                                  at               collapsed... like nuns
                               visi.com            in the street... they had
                                                   no teenappeal!


Reply via email to