Finding the window, getting and releasing a DC and calling send_data_channel for every loop iteration looks really wasteful.

Cheers,
_