Reply to Re: Extension loading. Is it inefficient?

Your name:

Reply:


Posted by Chung Leong on 06/25/06 18:49

ImOk wrote:
> I am using Windows IIS with PHP5 CGI. When I want to use an extension
> in PHP5 under Windows I enable the extension line in PHP.INI. (e.g.
> extension=php_sqlite.dll).
>
> Does PHP load all the extensions in the PHP.INI on every invocation of
> a request? If I have 20 different extensions not all of them are used
> on every page request. Is this inefficient?

Yes, if you're using CGI. DLL loading is quite fast on Windows though.
Only a small portion of the file is loaded into memory initially, with
the actual code brought in from disk only when it's used.

One thing that you might want to do is toss out all the longish
comments in php.ini. Parsing all that extra text probably has a larger
impact on performance.

> Would using dl() be more efficient? And why is it being depracated
> under 5?

Because dl() doesn't work in a multithreaded situation. While it's
possible to get it to work with various locking and reference counting
mechanism so that one thread doesn't unload the code used by another,
you end up just replicating the service provided by the OS.

[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

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