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
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:clearphp please stache:warmand 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
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
Installation
Existing Laravel app
Additional details
No response