Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Foreach loop takes a long time to process and my report times out before page is rendered

by jacaril (Beadle)
on May 18, 2011 at 16:51 UTC ( #905512=note: print w/ replies, xml ) Need Help??


in reply to Foreach loop takes a long time to process and my report times out before page is rendered

A few options mostly from what I'm seeing here.

It looks like you are precaching the entire table to a set of hashes and then sorting them and looking up each key individually. If you saved off the data to an array you could save time on the sort call and hash lookups.

An option I do use a bit is to utilize Ajax. Setup a back end process which creates the report and have the Ajax calls populate a div when the report is complete.


Comment on Re: Foreach loop takes a long time to process and my report times out before page is rendered

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://905512]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2014-07-23 09:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (137 votes), past polls