~/talk

Profiling PHP Applications

Talkat PHP UK Conference 2014 · 2014-02-21..02-22· [observability, testing]
slides:none on file

ResearchGate measures both backend and perceived frontend speed with the navigation timing API and ships those timestamps back as zero‑byte image or XHR hits, aggregates them through Logstash into Graphite and watches gaps (backend 123 ms vs complete 890 ms). Profiling uses Xdebug locally and XHProf (activate 0.5–1% of production requests, view in xhGUI) to find slow SQL, cache misses and hot functions; the Symfony Debug Toolbar (or borrowed equivalents) surfaces queries, cache hits and timelines so fixes target the actual slow call not the vague topic.

AI-written summary · about

  1. 0:00Intro
  2. 0:51ResearchGate SCIENTIFIC NETWORK
  3. 6:53Step 1
  4. 16:09Graphing it
  5. 18:12Can we measure more?
  6. 18:26Load balancer
  7. 20:39More fine grained metrics
  8. 22:17Define goals
  9. 22:43Step 2
  10. 23:53Webgrind
  11. 24:09DEMO
  12. 26:13Use it locally on your dev machine
  13. 26:44XHProf
  14. 30:22php-meminfo
  15. 32:06Symfony Debug Toolbar
  16. 34:16Extend it
  17. 40:41Step 3
  18. 40:53That's something you have to do
  19. 41:04Keep up to date
  20. 44:24Speed matters
  21. 49:04Some hints on better performance
  22. 49:17The obvious
  23. 49:31Minify JS
  24. 49:42Correct caching headers
  25. 49:55Opcache
  26. 50:11APCU
  27. 51:20Minimize redirects
  28. 51:43Check image compression
  29. 52:31Check YSlow, Pagespeed
  30. 53:14Move logic to async workers
  31. 53:35The "crazy" stuff
  32. 55:48Load content asynchronously
  33. 56:36Flush content early
  34. 57:18Move logic to shutdown handlers
  35. 57:28function.php
  36. 57:41Promises / Futures
  37. 58:31pushState
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.