Home > Archive > PHP on Windows > April 2005 > Re: [PHP-WIN] Optimize php code
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: [PHP-WIN] Optimize php code
|
|
| Graeme 2005-04-06, 12:43 pm |
| You need to find out where the code is spending its time. You can
quickly do that calling the microtome() function at various points in
your program and then calculating the time spent. Once you have located
the bottlenecks then you will need to think about your design, "Can this
be improved?" Obviously there is no universal panacea.
graeme.
martin hochreiter wrote:
> Hi there!
>
> I'm not the experienced php user, but I've been using
> php for a while and I've already written some bigger
> applications with it.
>
> These bigger applications are the 'problem', I know
> how to optimize database access but I have no idea
> how to optimize php code ... what makes php slow,
> what constructions, commands whatever I have to
> avoid.
>
> Can someone please give me a hint?
>
> lg
> martin
>
--
Experience is a good teacher, but she sends in terrific bills.
Minna Antrim
| |
| Martin Hochreiter 2005-04-06, 12:43 pm |
| Hi!
That was the only solution for my problem, I discovered myself.
Beside that I am searching for other hints ... I learned from
an article that some command - constructions are not processed
very quickly from the php interpreter (string conversions) and
some control structures are faster then other ones. Unfortunately
I can't remember what magazine it was.
lg
> You need to find out where the code is spending its time. You can
> quickly do that calling the microtome() function at various points in
> your program and then calculating the time spent. Once you have
> located the bottlenecks then you will need to think about your design,
> "Can this be improved?" Obviously there is no universal panacea.
>
> graeme.
>
> martin hochreiter wrote:
>
| |
|
|
|
|
|