﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
33433	Avoid calling resolve() when unnecessary in technical_404_response	Hrushikesh Vaidya	Hrushikesh Vaidya	"As discussed in the comments of this [https://github.com/django/django/pull/15286#issuecomment-1008798626 PR], we can avoid calling `resolve(request.path)` in the `technical_404_response` if `request.resolver_match` is already set.

This fix first checks if the resolver is `None` before calling `resolve()`, and avoids the call entirely if we have already resolved.
{{{
caller = ''
if resolver_match is None:
    try:
        resolver_match = resolve(request.path)
    except Http404:
        pass

if resolver_match is not None:
    caller = resolver_match._func_path
}}}"	Cleanup/optimization	closed	Core (URLs)	4.0	Normal	fixed			Ready for checkin	0	0	0	0	0	0
