cms
cms copied to clipboard
Big multisite slow down in 4.51.0 and up
Bug description
This issue is similar to #9971 and it was introduced in #5502.
When I have updated my multisite with 15 locales and a lot of content the more that 1000+ entries. The performance decreased to 80+ seconds on the first load when using v4.51.0 and up from the 2.5 seconds previous versions prior v4.51.0 did in the first load. (I even updated to statamic v5.4.0 and still the performance issue persists).
NOTE: This slowness happens only in the FIRST load, what I mean by first load:
run:
php artisan cache:clear
php please stache:warm
and then visit a page. It will take ages to load but after it loads then everything is loading fast as usual, arount 600ms per page.
I have noticed that if I comment this line of code in vendor/statamic/cms/src/Entries/Entry.php line 60
use HasDirtyState;
Entry
The issue is fixed in all versions after v4.51.0 and no slowness happens.
How to reproduce
- Have multisite enable with multiple locales and many entries with unique uri.
- Execute some Entry queries in the same time.
Measure it with v4.50.0 and v4.51.0 or the newest v5.4.0 and see the slowness that happens when HasDirtyState is enabled.
Logs
No response
Environment
Environment
Application Name: Barista
Laravel Version: 10.41.0
PHP Version: 8.1.28
Composer Version: 2.7.6
Environment: local
Debug Mode: ENABLED
URL: barista.com.test
Maintenance Mode: OFF
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: redis
Database: mysql
Logs: stack / single, bugsnag
Mail: log
Queue: sync
Session: file
Statamic
Addons: 3
Antlers: runtime
Stache Watcher: Disabled
Static Caching: Disabled
Version: 4.51.0 PRO
Statamic Addons
jacksleight/statamic-bard-mutator: 2.3.0
jacksleight/statamic-bard-texstyle: 3.1.4
simonhamp/gitamic: 2.2.2
Installation
Existing Laravel app
Additional details
No response
When I have updated my multisite with 15 locales and a lot of content the more that 1000+ entries. The performance decreased to 80+ seconds on the first load when using v4.51.0 and up from the 2.5 seconds previous versions prior v4.51.0 did in the first load. (I even updated to statamic v5.4.0 and still the performance issue persists).
NOTE: This slowness happens only in the FIRST load, what I mean by first load:
How long did the first load take before updating to 4.51.0?
When I have updated my multisite with 15 locales and a lot of content the more that 1000+ entries. The performance decreased to 80+ seconds on the first load when using v4.51.0 and up from the 2.5 seconds previous versions prior v4.51.0 did in the first load. (I even updated to statamic v5.4.0 and still the performance issue persists). NOTE: This slowness happens only in the FIRST load, what I mean by first load:
How long did the first load take before updating to 4.51.0?
On statamic 4.44.0 the first load is 2.3 seconds.
Are you able to provide access to the site?
This issue has not had recent activity and has been marked as stale — by me, a robot. Simply reply to keep it open and send me away. If you do nothing, I will close it in a week. I have no feelings, so whatever you do is fine by me.
This issue can be closed. We have updated into statamic v5.25.0 and the issue doesn't appears anymore. Everything is superfast and very snappy!
Glad to hear it!