core icon indicating copy to clipboard operation
core copied to clipboard

Performance: Cached Routes + opcache

Open fp07 opened this issue 3 years ago • 2 comments

Is it possible to cache the current routes? For max performance?

Examples:

  1. https://github.com/nikic/FastRoute#caching
  2. https://github.com/laravel/framework/blob/8.x/src/Illuminate/Foundation/Console/RouteCacheCommand.php

fp07 avatar Jan 16 '22 18:01 fp07

Any suggestion @mikecao?

fp07 avatar Feb 11 '22 15:02 fp07

Opcache should work with Flight.

Flight is really light.

Other things such as database or dynamic content would probably be the performance bottleneck.

magikstm avatar Feb 18 '22 04:02 magikstm

If you have a large amount of routes, then caching is beneficial. If you only have a couple dozen, it's basically worthless. When you have 100s of routes then caching becomes amazing!

Closing for now.

n0nag0n avatar Jan 13 '24 17:01 n0nag0n