You are here: Re: Performance impact of "require"ing lots of source? « PHP Programming Language « IT news, forums, messages
Re: Performance impact of "require"ing lots of source?

Posted by NC on 03/28/07 17:32

On Mar 27, 11:17 am, "lister" <listerofsme...@hotmail.com> wrote:
>
> I have a fairly diverse range of data that I want to cache in the
> session rather than pulling it from the database on every page
> refresh.

Consider enabling query cache in the database instead. In terms of
disk operations, it's going to be the same or faster (reading from
the DB vs. reading from a file where session information is stored);
in terms of CPU time, much easier (no serialization/unserialization
required).

> This has put me in the worrying situation of having to "require"
> pretty much every class definition in my project on every page, and
> I'm concerned about the performance impact this is going to have due
> to PHP having to parse reams of code every time.
>
> Are there any elegant ways around this?

Yes. Opcode caching. PHP can be configured to cache the
intermediate
bytecode, so it doesn't have to go back to the source files, unless
they have been modified.

> Am I worrying over nothing?

Most likely.

Cheers,
NC

 

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

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