-
-
Notifications
You must be signed in to change notification settings - Fork 390
[TwigComponent][Perf] Remove component dumping from profiler to reduce memory usage #3066
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
base: 2.x
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -69,6 +69,7 @@ public function load(array $configs, ContainerBuilder $container): void | |
| $defaults = []; | ||
| } | ||
| $container->setParameter('ux.twig_component.component_defaults', $defaults); | ||
| $container->setParameter('ux.twig_component.profiler_dump_components', $config['profiler_dump_components']); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would remove this then :) |
||
|
|
||
| $container->register('ux.twig_component.component_template_finder', ComponentTemplateFinder::class) | ||
| ->setArguments([ | ||
|
|
@@ -219,6 +220,10 @@ public function getConfigTreeBuilder(): TreeBuilder | |
| ->info('Enables the profiler for Twig Component (in debug mode)') | ||
| ->defaultValue('%kernel.debug%') | ||
| ->end() | ||
| ->booleanNode('profiler_dump_components') | ||
| ->info('Enables the dump components for Twig Component (in debug mode)') | ||
| ->defaultValue('%kernel.debug%') | ||
| ->end() | ||
|
Comment on lines
+223
to
+226
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. defaultTrue() seems more logical here .. (its not just in debug mode but... when twig component profiler is enabled) Without the parenthesis, probably something like "Dump components in the Twig Component profiler panel" wdyt ? |
||
| ->scalarNode('controllers_json') | ||
| ->setDeprecated('symfony/ux-twig-component', '2.18', 'The "twig_component.controllers_json" config option is deprecated, and will be removed in 3.0.') | ||
| ->defaultNull() | ||
|
|
||
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 would use an abstract arg here, and define the parameter on the definition after the load(debug.php) in the extension class... not sure we should create a parameter here