[wp-trac] [WordPress Trac] #61532: Improve the performance of `WP_Image_Editor_Imagick::supports_mime_type()`
WordPress Trac
noreply at wordpress.org
Mon Oct 7 17:11:59 UTC 2024
#61532: Improve the performance of `WP_Image_Editor_Imagick::supports_mime_type()`
-----------------------------------------+--------------------------
Reporter: joemcgill | Owner: joemcgill
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.7
Component: Media | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch changes-requested | Focuses: performance
-----------------------------------------+--------------------------
Changes (by joemcgill):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"59189" 59189]:
{{{
#!CommitTicketReference repository="" revision="59189"
Media: Cache the results of _wp_image_editor_choose.
This saves the `WP_Image_Editor` implementation that supports the queried
options to a cache to avoid performing redundant compatibility checks,
which can be expensive. For example,
`WP_Image_Editor_Imagick::supports_mime_type()` can get called in the
editor multiple times to determine which image formats can be supported
during `wp_plupload_default_settings()`.
With this cache, the support will be stored for 1 day, speeding up loading
times for the editor. This also introduces a new global caching group,
`image_editor` to manage any subsequent caches that are related to image
editor optimizations.
Props joemcgill, desrosj, westonruter, flixos90, adamsilverstein,
mukesh27, joehoyle.
Fixes #61532.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61532#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list