The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP compile: performance impact??

Discussion in 'General Discussion' started by dellio, Oct 3, 2008.

  1. dellio

    dellio Member

    Joined:
    Sep 8, 2008
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    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. I hope all of you know what I mean! Thanks
     
    #1 dellio, Oct 3, 2008
    Last edited: Oct 3, 2008
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,460
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The Extensions are compiled statically, so they are always resident in the PHP interpreter. Same with the Apache Modules.
     
  3. dellio

    dellio Member

    Joined:
    Sep 8, 2008
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    In other words, yes, there is a performance impact, even if a certain script doesn't use the extension in question?

    For example, would my php run faster if I loaded the extension using php.ini, instead of statically compiling it from source? Because I'd like to enable extensions that don't get used much, but wondering if these not-so-used extensions should be compiled or not?

    If I don't compile, 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.
     
    #3 dellio, Oct 3, 2008
    Last edited: Oct 3, 2008
Loading...

Share This Page