collections - speed #6317
Unanswered
danijelk
asked this question in
Troubleshooting
Replies: 1 comment 1 reply
-
Have you tried disabling the watcher in your tests? If you've got lots of files, the watcher will be traversing them every test and slow things down unnecessarily. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
we've used statamic for some time now, and after spending time upgrading to 3.3 we now want to try to find out how we can speed up local development as pagespeed can be quite slow. We've created a unittest which should crawl all pages to assert status 200, which isn't going all too well (timeouts and freezes in CI), and we wanted to share our findings and thoughts on where there is room for improvements.
background
It's a fairly simple site (https://vemco.group) with multi lang support enabled.
cache
helps to go from the default 5-15s to 170ms. But gives unexpected behaviour as it seems to cache 'too' good.
CACHE_DRIVER=array
CACHE_STRATEGY=full
gets it below 100ms, best environment so far
CACHE_DRIVER=redis
CACHE_STRATEGY=half
slow default 5-15s speed
CACHE_DRIVER=redis
CACHE_STRATEGY=null
xdebug
disabling xdebug shaves off a couple of seconds, we run a fairly heavy analytics project with thousands of models loaded on pages, without this slowness, but we can't point out why xdebug would cause statamic to go so slow.
unittest
We simply get all routes and try to simply visit it with phpunit, but it fails when it visits some specific urls it seems for now
collections
Stripping everything away from templates didn't help much, what does help is when we move our ~60 blogs out of the collections folder. It's about a 1-2sec increase per language that we move out.
After moving all blogs out we're down to 1s loading time (with the default slowness cache setup) which is the acceptable timing.
final
So our focus are on the collections
Beta Was this translation helpful? Give feedback.
All reactions