As you know, debug_backtrace() function has a large output. I need to pass it in my filter.

$meta = apply_filters( 'filtername' , $meta , debug_backtrace() );

Does this have a big impact on site performance?

1 Answer 1


you can limit calls and ignore args like this to reduce performance:

// Limit backtrace to last 3 calls as we don't use the rest
// Limit argument was introduced in PHP 5.4.0
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3);
  • Thank you very much indeed!
    – ma ja
    Jan 12 at 2:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.