diff --git a/system/src/Grav/Common/Debugger.php b/system/src/Grav/Common/Debugger.php index 39862874a..0e66ebf21 100644 --- a/system/src/Grav/Common/Debugger.php +++ b/system/src/Grav/Common/Debugger.php @@ -577,10 +577,16 @@ class Debugger $method = $this->parseProfilerCall(array_pop($parts)); $context = $this->parseProfilerCall(array_pop($parts)); + // Skip redundant method calls. if ($method === $context && $method === 'Grav\Framework\RequestHandler\RequestHandler::handle()') { continue; } + // Do not profile library calls. + if (strpos($context, 'Grav\\') !== 0) { + continue; + } + $table[] = [ 'Context' => $context, 'Method' => $method, @@ -608,13 +614,16 @@ class Debugger return $call; } + // It is also possible to display twig files, but they are being logged in views. + /* if (strpos($class, '__TwigTemplate_') === 0 && class_exists($class)) { $env = new Environment(); - /** @var Template $template */ + / ** @var Template $template * / $template = new $class($env); return $template->getTemplateName(); } + */ return "{$class}::{$call}()"; }