- Issue created by @hanoii
- Status changed to Needs review
5 months ago 7:02pm 2 July 2024 - 🇦🇷Argentina hanoii 🇦🇷UTC-3
MR!5 is a simple addition to the code.
- 🇧🇷Brazil renatog Campinas
Great, thanks @hanoii
P.S. I think the category should be Feature Request instead of Support, right?
- 🇦🇷Argentina hanoii 🇦🇷UTC-3
Yes, I accidentally selected support. After using this, making it a $setting is even better than a config because it allows for dynamic configurations on settings.php.
i.e.
$settings['memory_profiler_threshold'] = 120; // Admin paths $admin_paths = [ '/knowledgebase/admin', '/knowledgebase/node/add', '/knowledgebase/node/%node/edit', ]; foreach ($admin_paths as $path) { if (strpos($current_path, $path) === 0) { ini_set('memory_limit', '256M'); $settings['memory_profiler_threshold'] = 240; } } $high_memory_paths = [ '/knowledgebase/metrics', ]; foreach ($high_memory_paths as $path) { if (strpos($current_path, $path) === 0) { ini_set('memory_limit', '512M'); $settings['memory_profiler_threshold'] = 500; } }