Why is there a 10 second delay when printing on Ubuntu Server 10.04?
Solution 1:
I experience some of the same. I'm not sure if this is the same problem as you, but we experince that with receipt-printers, some of them suddenly started having a 4 seconds delay when printing, while others came straight away.
This was after an Cups upgrade (Slackware linux).
After a lot of debugging, we have found that the printers supporting SNMP doesn't have the delay, while printers not supporting SNMP does have the delay.
It seems cups, after the upgrade, is trying to fetch info from the printer by SNMP before sending the actual printjob.
I'm now looking for a way to disable this feature... Will try to write back if I find a solution.
I should mention that we are using raw/socket connection to these printers. I see RedHat has a reported bug about this, but I'm not allowed to view it (BZ#709896)
I can't really find out how I can disable the SNMP-communication in Cups. :\
Solution 2:
A potential unrelated answer to your question but was certainly the answer to my question was for a local USB thermal printer -- why was it causing a delay of 5 seconds between prints.
The solution turned out to be that not all USB printers should be setup as bi-directional communication like CUPS wants to do. So setting up a "quirk" for the printer in the /usr/share/cups/usb area of cups to include the specific printer "ID"and setting flags such as "unidir" "no-reattach" "soft-reset" seemed to entirely fix the issue for me. Hopefully anyone looking for the same issue can save a few hours debugging into the cups code to understand what was obvious once i keyed in on the debug output that said it was waiting for the USB read thread to exit (apparently 5 seconds).