RSS DAILY NEWS TICKER EXAMPLE


home > overview

Arnold Daniels' Blog: Improve performace: check your loops




Arnold Daniels has a suggestion for developers out there to help improve the performance of their applications - check your loops.

So you have a script which is not performing the way you want to. The first thing you should do it try to find out what the problem is. There are some tools out there that can help you.

He mentions the profiler in Zend Studio as well as the one in XDebug. If you can't install those, however, he has another suggestion - FirePHP (a tool that can help time execution times in a simple and easy to include way.

With tools in hand, he offers a few suggestions as to what to check for and do in your applications:

  • Get the data ready before going into the loop
  • Don't do things in the loop, you can also do outside it
  • Use create_function to aid you
  • Be careful with abstraction in loops
  • Sometimes you can prevent loops altogether
  • Last resort: write an extension



click here to see original article or to find similar articles

 RSS DAILY HEADLINES

HEADLINES

U.S. spied on Iraqi leaders, book saysJournalist's new book reveals sharp dissent within administration and points to "groundbreaking" covert techniques that shaped course of the war.

A Plague of Rats Isnt Worth Some Ink? Bangladesh Is in Crisis

Spent much time thinking about Bangladesh lately? If the answer is no, don't worry — I was in the same boat, so to speak, until I saw these pictures.

Earlier this month, crushing rains left 20 people dead and over 20,000 stranded when overwhelming rainfall left five feet of standing water in the low-lying areas. This is on top of already taxed landscapes that flooded when melting Himalayan glaciers burst the 200 rivers that web across the country last year. Bangladesh under water is seeming like a real and permanent possibility.

The International Panel on Climate Change (IPCC) — whose claims are usually conservative — said that Bangladesh is heading to lose 17 percent of its land and 30 percent of its food production by 2050. That's like California and New York drowning, and the whole Midwest ceasing production of food.


If this happens, more than 20 million Bangladeshis will be without a patch of land to stand on. Though hardship in the country isn't entirely recent: since 1971, Bangladesh has endured over 200 disasters that have left a total of 500,000 dead and affected a total of 500 million people.

And I haven't even said anything about the plague of rats that's consuming all of their food. A plague of rats. I wish, wish there was more room for stories like this in the general consciousness — shouldn't we be hearing about this every night? Not to dwell on the gloomy, but just knowing about this makes the answer to this question pretty clear to me.

Source

Polish prosecutors probe possible CIA jail (Reuters)

A guard shuts the gate to the airport in Szymany in northeastern Poland in this file 2005 picture. Human Rights Watch identified the airport as a potential site of alleged CIA prisons used to interrogate al Qaeda captives. Poland strongly denied it was hosting such facilities. (FORUM/Tomasz Marek/Reuters)Reuters - The Polish prosecutor's office is investigating allegations that there was a CIA prison in Poland where al Qaeda suspects were questioned and guards might have used methods close to torture, the prime minister's top adviser said on Friday.



Find this article in Google