I have some expensive web service calls that are causing delays in one of my sites. These calls are performed using hook_exit, but my themers aren't bulding themes that will display content before a page load is complete. Anyone have any ideas about an alternative strategy that might be used so that I can load some extra information without the user waiting for it? Can anyone point me to some sample code? Thanks as always, Dave
Maybe you could execute a php file in the background using an exec() call and do the heavy logic in that external php script. This is the approach I used in my video module when a user upload a video which need to be converted to another format. The video conversion is handled by an helper php file which is called by the script using exec(). Hope this helps. Fabio David Metzler wrote:
I have some expensive web service calls that are causing delays in one of my sites. These calls are performed using hook_exit, but my themers aren't bulding themes that will display content before a page load is complete.
Anyone have any ideas about an alternative strategy that might be used so that I can load some extra information without the user waiting for it? Can anyone point me to some sample code?
Thanks as always,
Dave
http://php.net/register_shutdown_function may be interesting. Konstantin Käfer – http://kkaefer.com/
I'm not sure that register_shutdown_function alone does what is needed here. You would also need to flush the output buffer (which I don't think drupal uses by default) to send data before the shutdown functions execute. --mark On 4/17/07, Konstantin Käfer <kkaefer@gmail.com> wrote:
http://php.net/register_shutdown_function may be interesting.
Konstantin Käfer – http://kkaefer.com/
participants (4)
-
David Metzler -
Fabio Varesano -
Konstantin Käfer -
mark burdett