Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toolbar - Make it possible to turn off var data collection #5295

Merged
merged 2 commits into from
Nov 10, 2021

Conversation

najdanovicivan
Copy link
Contributor

Description
When there are a lot of vars being passed to the view for example array of entities with lots of parameters in each entity, var data can get very big and will consume a lot of memory. A new parameter in toolbar config is introduced here to that collection of var data can be disabled.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@sfadschm
Copy link
Contributor

sfadschm commented Nov 8, 2021

I like this.
Maybe a step to far, but could this also be connected to a session setting so we can overwrite the value for the current session on-the-fly, lets say, from a toggle button in the toolbar, maybe?

@najdanovicivan
Copy link
Contributor Author

Cookie might better for this one. But confif should still exist to be able to fully disable it especially in situations where memory is being used over the limit as it wont be possible to load the site to triger the switch

@kenjis kenjis added the enhancement PRs that improve existing functionalities label Nov 9, 2021
@sfadschm
Copy link
Contributor

sfadschm commented Nov 9, 2021

Cookie might better for this one. But confif should still exist to be able to fully disable it especially in situations where memory is being used over the limit as it wont be possible to load the site to triger the switch

Completely agree!

system/Debug/Toolbar.php Outdated Show resolved Hide resolved
Co-authored-by: Lonnie Ezell <lonnieje@gmail.com>
@lonnieezell lonnieezell merged commit 903647c into codeigniter4:develop Nov 10, 2021
@najdanovicivan najdanovicivan deleted the toolbar-vars branch March 23, 2022 10:38
@najdanovicivan najdanovicivan restored the toolbar-vars branch March 23, 2022 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement PRs that improve existing functionalities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants