﻿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
35998	Add caching to urlize	Sarah Boyce	Sarah Boyce	"`urlize` will check every word for whether it is a url (and then updates the url to be a html link).
We can add some form of caching so that it doesn't repeat the checks on the same ""word""

PR: https://github.com/django/django/pull/18665

Benchmarks:

Before:
{{{
>>> import cProfile
>>> from django.template.defaultfilters import urlize
>>> cProfile.run(""urlize('Django. ' * 1_000)"")
         61048 function calls (59047 primitive calls) in 0.030 seconds
}}}
After:
{{{
>>> import cProfile
>>> from django.template.defaultfilters import urlize
>>> cProfile.run(""urlize('Django. ' * 1_000)"")
         3783 function calls (3702 primitive calls) in 0.005 seconds
}}}

PR to add benchmark to django-asv: https://github.com/django/django-asv/pull/91"	Cleanup/optimization	closed	Template system	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
