You are here: Re: How to delay the start of a function « PHP Programming Language « IT news, forums, messages
Re: How to delay the start of a function

Posted by Colin McKinnon on 08/24/05 11:29

sindre hiåsen wrote:

> Hi,
>
> My problem is that a function in the page have a rather heavy mysql query.
> The query takes between 6 - 10 seconds. while the query takes place other
> content on the page stop loading (Opera). Explorer and Firefox seems to
> wait for the whole page to load befor drawing the site.
>
> Is there a way to tell the browser to draw all the content except for this
> function and run through this at the end, alternatively to run the process
> in backround?
>
> This functionality a want is on many sites who let you search through
> multiple whois databases.
>

Use flush() before the function.

If you're really clever with CSS or javascript, you could generate the rest
of the page apart from the query output, call the function at the end of
the script and make it appear in the middle of the page but this is not
trivial.

Alternatively fix your query/schema so it goes faster (go ask on a MySQL
group, quoting the query and the output of EXPLAIN...)

C.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация