A white beam speeds through a row of glass panes and leaves green light trails.
Feature · Performance

No overhead where no behavior applies. Sub-microsecond interception where it does.

The framework resolves matching rules during compilation and generates optimized PHP. See how it performs in real benchmarks, including the cost of executing attached behaviors.

Measured, rounded up, reproducible

Every value is rounded up from docs/performance.md, which has the exact figures and how to reproduce them.

  • per call< 1 µsfor a method call through its middleware
  • per call< 1 µsfor three behaviors stacked around one call
  • per request< 4 msadded to a request with about 3,500 intercepted calls and property accesses
  • kernel boot< 0.2 msto boot the kernel
  • cold start≈ 1 msdifference to the plain app, fresh container with preloading
  • to weave≈ 1 sa 2,000-file app with 4 workers
In production

Build the cache once. Trust it on every request.

Weave at deploy time, then switch on PREBUILT_CACHE. Requests never weave, never write, and never check the filesystem.

  • Weave the whole app in parallel at deploy or image build time
  • PREBUILT_CACHE: zero filesystem checks per request
  • Read-only file systems, Docker and Kubernetes
  • OPcache preloading generated for you with --preload
Configuration and deployment guide
deploy.sh
# at deploy or image build timevendor/bin/aspect cache:warmup:aop public/index.php --workers=4 --preload
public/index.phpcaching
use Go\Aop\Features; ApplicationAspectKernel::getInstance()->init([    'debug'    => false,    'cacheDir' => __DIR__ . '/../var/cache/aop',    'features' => Features::PREBUILT_CACHE,]);