[TASK] Optimize usage of debug_backtrace()