[wp-trac] [WordPress Trac] #61624: Cache translations
WordPress Trac
noreply at wordpress.org
Wed Jul 10 20:21:42 UTC 2024
#61624: Cache translations
-------------------------+-----------------------------
Reporter: leonardola | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: I18N | Version: trunk
Severity: normal | Keywords:
Focuses: performance |
-------------------------+-----------------------------
While working on a big codebase I found out that translations were taking
up to 40% of request times.
When I dug deeper I noticed that some plugins were translating the same
strings over and over and that WordPress does not cache the translations
and ends up calling all of the gettext filters again each time.
It would be good to either cache the translations in WPCore or to at least
add a hook that would allow plugins to cache translations and preemptive
return a cached translation when they see fit instead of running all of
the gettext filters again.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61624>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list