Jump to content

PHP compile: performance impact??


dellio

Recommended Posts

Hi,

 

I was wondering, when compiling PHP with extra options such as OpenSSL or CurlSSL or GD or FTP or TTF, or anything for that matter...

 

Would this have any performance impact at all on PHP itself such as execution time, or any other performance measure? Or would it simply add those options in, run in the background, and only come into play when the specific functions are requested by a script, in other words no performance impact?

 

I'm trying to debate if compiling certain options would affect execution time for scripts not requiring these newly compiled options. Say on a server-wide basis if it was under heavy load. I hope all of you know what I mean! Thanks

Link to comment
https://forums.phpfreaks.com/topic/126869-php-compile-performance-impact/
Share on other sites

Unless you actually invoke the functions, I can't see any speed loss happening due to the fact that all extensions are is a bunch of a functions written in C.  PHP doesn't really do much if they're actually used.

I figured the same. But in another instance, the extensions would be resident in PHP interpreter.. Meaning always there.. Where as loading them in through php.ini instead of at compile time, wouldn't it be faster and only use the extension when needed?

 

Im trying to figure out if theres a difference with statically compiled or through php.ini.

Thanks for your input by the way, it is appreciated!

 

I figured the loading of a dynamic extension is slower, however, if I don't compile them in, I would come to think that the PHP executable is smaller (and loads faster) containing the core structure. If the added extensions in php.ini are not loaded unless the script needs them, would this not be an advantage? Sometimes there are extensions that are needed that aren't enabled, but its only for a very small feature on a script for a small site, and is not essentially worthy of a recompile.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.