I'm having issues with modx [cms system] and php performance. and I was wondering if it could have anything to do with the way php is compiled. Is there a performance benefit to compiling php with specific modules as opposed to loaded at runtime. i.e. the performance issues appear to be during database operations using pdo, the slow system has -disable-pdo, could I expect a significant performance bump if I recompiled it --with-pdo [incidentally, what does the --with-pdo=shared m
It won't really make a difference. I'm assuming you're not running PHP as CGI (FastCGI is something else). The difference in load time for statically or dynamically linked modules would only affect the initial load time, and there are performance tradeoffs for both.
It's almost impossible for the difference to add up to anything if PHP is started once and then services more than one request from your frontend server (Apache, nginx, etc). More likely, the code itself is poorly optimized, does many needless database queries, uses lookups on unindexed DB columns, does needless looping, writes and rewrites strings over and over again, and so on and so forth. The list really does just go on and on.
Profile and benchmark the code, and try and find things you can easily optimize with the least effort. Added DB indexes is a freebie and will often times make many orders of magnitude of difference in load times. Install an opcode cache (XCache is great, APC and memcache are also good). Use an object cache (memcache is best here because it shares its cache amongst all processes, but XCache or APC will work well too). Use an HTML cache. etc.