使用php的IIS 7.5性能问题

使用php的IIS 7.5性能问题,php,performance,iis,Php,Performance,Iis,出于测试目的,我在PHP 5.4中有以下脚本: define(START_TIME_CUSTOM, microtime(true)); function onEndTimeCompute() { $timeTaken = microtime(true) - START_TIME_CUSTOM; echo "Completed In: ".number_format($timeTaken, 4)." Seconds\n"; } register_shutdown_function(

出于测试目的,我在PHP 5.4中有以下脚本:

define(START_TIME_CUSTOM, microtime(true));
function onEndTimeCompute() {
    $timeTaken = microtime(true) - START_TIME_CUSTOM;
    echo "Completed In: ".number_format($timeTaken, 4)." Seconds\n";
}
register_shutdown_function('onEndTimeCompute');

echo "Just before exit";
exit;
echo "Just after exit";
(脚本取自此处:) 执行时间为:0.00002秒

我正在本地Web服务器IIS7.5上运行。
我也在使用Chrome

加载页面需要1秒的时间。你知道为什么需要一整秒钟吗?我希望它能立即响应

问候,,
Paul

除非您将PHP作为fastCGI模块运行,否则延迟时间就像是因为IIS必须从头启动一个PHP进程,即:加载可执行文件、解析配置、加载扩展等。另一方面,fCGI保持X进程运行,并准备好在请求到来时立即处理它们