Reply to Re: A question about efficiency

Your name:

Reply:


Posted by Erwin Moller on 07/20/05 13:05

Stephen Oakes wrote:

>
> "Erwin Moller" <sin_hum_rea_thi_Iam_spa_too_muc@spa.com> wrote...
>>> - don't do anything, but rely on server caching. Is PHP / Apache
>>> caching any good?
>
>>> - Periodically "publish" my PHP-generated pages to flat HTML pages and
>>> serve them up instead of the PHP.
>
>>> - Other things?
>
>> I am unsure what you expect from the first solution.
>
> Me too, that's why I asked. I don't really know enough about how
> server/mysql caching works to know whether I need do anything extra.
>

So maybe there are great solutions out there that work great, we both don't
know about.
:-)

>> You second approach is easy to implement, and easy to understand.
>> I did it before, and it works realy easy.
>>
>> The approach I choosed was a little different from the one you describe,
>> but
>> similar:
>>...
>
> Yes, that's the basic approach I had in mind, although more on a per-page
> basis than part-page. That idea might help in some places.


In my case I had a few lists (top10 like stuff) that appeared on several
pages. So a small piece of HTML in an include made the most sense in my
situation.
Of course your situation might differ, and you need complete pages: but
principle is the same, I expect.


>
>> Of course, it is up to you to decide which pieces on your site are
>> suitable
>> for this approach.
>
> Did you notice any improvements in speed?

Yes.
Some of the queries I needed took up a lot of time (because of quite complex
calculations needed to produce the top10 lists).

I would like to add that the above solution is really easy to implement.
Instead of writing the html to output, you just put it into the appropriate
file.

Of course the user PHP/WWW-data/nobody/whatever needs writepermission in the
directory where you store these files. That is why I made a special
directory for it, because I didn't want that that user had writepermission
on all my files, so in case of a securitybreach, the damage would be
limitted to those includefiles.

Hope this helps you a bit.

Regards,
Erwin Moller

>
> --
> Stephen Oakes

[Back to original 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

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