While testing the local site I've noticed ~10x difference in time reported by Blackfire as compared to other sources.
The setup:
- macOS High Sierra with all stack installed locally via Homebrew (similar to Laravel's Valet)
- Nginx 1.13.9
- PHP 7.2.3, with opcache
- Xdebug 2.6.0 (disabled during profiling)
- Blackfire agent 1.16.0
- Blackfire probe 1.18.2
- Latest WordPress with default theme and settings, created using custom Composer-powered skeleton where WP is a dependency itself
- Composer's autoloader is optimized
- HTTPS (self-signed, signed with custom local CA)
- HTTP/2
The results:
- Blackfire: 321ms
- Chrome's Network timing (TTFB): 34.80ms
- WordPress - Query Monitor plugin: 0.03s (or 30ms)
- WordPress - Laps plugin: 0.029s (or 29ms)
- CLI
curl -s -o /dev/null \-w "%{time_total}\n" -k https://wp.test
looped 10 times: AVG 0.044s (or 44ms, individual runs delta is 2-3ms)
Tested multiple times. All sources except Blackfire are pretty consistent and report time in 30-50ms range. Perceived load time is "instant" like a real 30-50ms is. 350ms load time would be noticeable, that's why I do believe the Blackfire is lying here.
What am I doing wrong? Haven't noticed this before.
Update:
- Tested some other php stuff - a basic file with phpinfo only, memcached and opcache admin scripts - all of them are super fast and Blackfire reports the same timing as other methods.
- Tested on Vagrant VM (Laravel's Homestead), all WordPress sites are fast, Blackfire also reports the same timing as other methods.
Considering the above, there's definitely something wrong with Blackfire + WordPress + macOS High Sierra with local EMP stack.