-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Debug/Toolbar - Memory issue fix #4590
Debug/Toolbar - Memory issue fix #4590
Conversation
db3f7d3
to
519d3e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the concept but not the end result. We need to find some way to catch as much as we can. Does Kint (already included) not have some solution for this in place?
@MGatner I managed to make Kint work inside debug bar. The issue I had is that Kint render will return JS and CSS in as the string and since those are set as text via JS. The javascript from Kint will never be executed. So I had to play a bit with it to add the JS and CSS into the page head instead and then drop those when it's being rendered in the debug bar |
I'll take a look - if it is working then that's probably good. Kint also supports prefix modifiers to adjust the behavior - I think we could probably use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be fine. It definitely adds some complexity. See what you think of the text output option and if that is a worthy trade-off.
I am using @ prefix to return output. I tried text output as well but it looks nasty. I was unable to make it work by chaining prefixes eg @~d() will not work for me. Another problem with text output is it can get very long especially when controller is being passed to the view and if any of the variables contains HTML it may break the |
7d446de
to
66c72c4
Compare
Description
This is the very simple method to avoid memory leak issue #4137 when entity objects with circular references are passed to the view.
Checklist: