From cf2faeb3b73144666bb0e819b72b5bae977a9978 Mon Sep 17 00:00:00 2001 From: dracony Date: Sat, 26 Sep 2015 21:53:29 +0200 Subject: [PATCH] Reduce memory consumption of the debug_backtrace call Since the code does not need neither the 'object' not 'args' keys from backtrace, we can save some memory by not requesting them. I have a better idea planned too: first attempt getting the trace with limited back trace (limit to only about 5 results), and get the full one only if those were not enough --- src/Monolog/Processor/IntrospectionProcessor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Monolog/Processor/IntrospectionProcessor.php b/src/Monolog/Processor/IntrospectionProcessor.php index 8f553fe3..7a9de925 100644 --- a/src/Monolog/Processor/IntrospectionProcessor.php +++ b/src/Monolog/Processor/IntrospectionProcessor.php @@ -52,7 +52,7 @@ class IntrospectionProcessor return $record; } - $trace = debug_backtrace(); + $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); // skip first since it's always the current method array_shift($trace);