statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
4.09k stars 533 forks source link

Reusable fieldsets: memory usage & gate checks #7132

Open BrandonOldenhof opened 1 year ago

BrandonOldenhof commented 1 year ago

Bug description

We're using a pagebuilder-like functionality based on what Peak offers. For some reason we're seeing issues with high memory usage and a ton of Gate checks, as reported by the Laravel Debugbar.

As you can see below this entry:

image

How to reproduce

Still working on figuring out the steps. TBC

Logs

Excerpt of the "Gate" tab of the debug bar: ```shell array:4 [▼ "ability" => "access cp" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => "[]" ] SUCCESS array:4 [▼ "ability" => "view" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => "[0 => Object(Statamic\Entries\Entry)]" ] SUCCESS array:4 [▼ "ability" => "edit-other-authors-entries" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection), 2 => Object(Statamic\Fields\Blueprint) ] """ ] SUCCESS array:4 [▼ "ability" => "view" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => "[0 => Object(Statamic\Assets\Asset)]" ] SUCCESS array:4 [▼ "ability" => "delete" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => "[0 => Object(Statamic\Assets\Asset)]" ] SUCCESS array:4 [▼ "ability" => "view" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => "[0 => Object(Statamic\Assets\Asset)]" ] SUCCESS array:4 [▼ "ability" => "move" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => "[0 => Object(Statamic\Assets\Asset)]" ] SUCCESS array:4 [▼ "ability" => "rename" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => "[0 => Object(Statamic\Assets\Asset)]" ] SUCCESS array:4 [▼ "ability" => "replace" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => "[0 => Object(Statamic\Assets\Asset)]" ] SUCCESS array:4 [▼ "ability" => "store" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => "[0 => Object(Statamic\Assets\AssetContainer)]" ] SUCCESS array:4 [▼ "ability" => "create" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection) ] """ ] SUCCESS array:4 [▼ "ability" => "create" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection) ] """ ] SUCCESS array:4 [▼ "ability" => "create" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection) ] """ ] SUCCESS array:4 [▼ "ability" => "create" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection) ] """ ] SUCCESS array:4 [▼ "ability" => "create" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection) ] """ ] SUCCESS array:4 [▼ "ability" => "create" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection) ] """ ] SUCCESS array:4 [▼ "ability" => "create" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection) ] """ ] SUCCESS array:4 [▼ "ability" => "create" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection) ] """ ] SUCCESS array:4 [▼ "ability" => "create" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection) ] """ ] SUCCESS array:4 [▼ "ability" => "create" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection) ] """ ] SUCCESS array:4 [▼ "ability" => "create" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection) ] """ ] SUCCESS array:4 [▼ "ability" => "create" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection) ] """ ] SUCCESS array:4 [▼ "ability" => "create" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection) ] """ ] SUCCESS array:4 [▼ "ability" => "create" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection) ] """ ] SUCCESS array:4 [▼ "ability" => "create" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection) ] """ ] SUCCESS array:4 [▼ "ability" => "create" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection) ] """ ] SUCCESS array:4 [▼ "ability" => "create" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection) ] """ ] SUCCESS array:4 [▼ "ability" => "create" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection) ] """ ] SUCCESS array:4 [▼ "ability" => "create" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection) ] """ ] SUCCESS array:4 [▼ "ability" => "create" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection) ] """ ] SUCCESS array:4 [▼ "ability" => "create" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection) ] """ ] SUCCESS array:4 [▼ "ability" => "create" "result" => true "user" => "10c90b02-7330-435a-ae9d-3efd50388998" "arguments" => """ [ 0 => Statamic\Contracts\Entries\Entry, 1 => Object(Statamic\Entries\Collection) ] """ ] SUCCESS ``` ### Environment ```yaml Environment Application Name: Laravel Laravel Version: 9.35.1 PHP Version: 8.1.12 Composer Version: 2.3.7 Environment: local Debug Mode: ENABLED URL: smarthealth.works.test Maintenance Mode: OFF Cache Config: NOT CACHED Events: NOT CACHED Routes: NOT CACHED Views: CACHED Drivers Broadcasting: log Cache: statamic Database: mysql Logs: daily Mail: log Queue: sync Session: file Statamic Addons: 4 Antlers: runtime Version: 3.3.54 PRO Statamic Addons aerni/font-awesome: 1.2.0 edalzell/forma: 1.2 roxdigital/rox-text-css-classes: dev-master siterig/sendinblue: 1.0.1 ```

Installation

Existing Laravel app

Antlers Parser

No response

Additional details

Running valet locally

PatrickJunod commented 1 year ago

Bumping into the conversation. We are experiencing the same for a client. Also using the peak page builder.

image

Let me know if you need any infos