Topic: Comet 2.2 - Response delay

Hi All,

Just wanted to know whether anyone has had any problems with the delay in returned responses? I have an ajax application that is integrated with Smarty, and i just Comet to stream .html file contents out to DIVs. When using the native xajaxResponse it return the contents in microseconds. However, when I changed the functions over to use the comet response, the output is delayed with triggered - sometimes it takes > 1 second to return a few lines of interpreted text.

If comet doesn't poll, how exactly does it return and is there a way to speed it up?

Any info would help. Cheers all.

Regards,
TM

Re: Comet 2.2 - Response delay

Hi,

the comet plugin triggers a timeout per flush command. The default is around 1sec. You can configure this timeout by passing an optional value:

$objResponse = new cometResponse(0.1);

Note:
I do not recommend disabling the timeout, since the browser needs at least a few ms to parse the last response.